From 63303977071f34d8142709960e8dae97cea1951e Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 9 Aug 2022 23:48:44 +0100 Subject: examples -> etc --- etc/build | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 etc/build (limited to 'etc/build') diff --git a/etc/build b/etc/build new file mode 100644 index 0000000..9e9eb72 --- /dev/null +++ b/etc/build @@ -0,0 +1,17 @@ +#!/usr/bin/bash + +# An example build script that directs ghc to use a temporary directory for its +# intermediate files instead of writing them into XMOBAR_CONFIG_DIR. This +# allows using a read-only XMOBAR_CONFIG_DIR. To use this script, place it in +# XMOBAR_CONFIG_DIR and call it "build". + +bin=$1 +object_dir=$(mktemp -d) + +default_build_args=(--make xmobar.hs -i -ilib -fforce-recomp -main-is main -v0 -o "$bin" -threaded -rtsopts -with-rtsopts -V0) # From src/Xmobar/App/Compile.hs +extra_build_args=(-odir "$object_dir" -hidir "$object_dir") + +ghc "${default_build_args[@]}" "${extra_build_args[@]}" +status=$? +rm -r "$object_dir" +exit $status -- cgit v1.2.3