diff options
Diffstat (limited to 'build-scripts/build-cabal-sandbox')
-rwxr-xr-x | build-scripts/build-cabal-sandbox | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/build-scripts/build-cabal-sandbox b/build-scripts/build-cabal-sandbox new file mode 100755 index 0000000..435fa43 --- /dev/null +++ b/build-scripts/build-cabal-sandbox @@ -0,0 +1,22 @@ +#!/bin/sh -eu + +SRC_DIR="$HOME/.xmonad" +EXE_NAME="xmonad-ng" +OUT="$1" + +shift + +cd "$SRC_DIR" || exit 1 + +cabal sandbox init + +cabal configure \ + --enable-optimization \ + --enable-executable-stripping + +cabal install --only-dependencies + +cabal build + +find "$SRC_DIR"/dist -type f -executable -name "$EXE_NAME" \ + -exec mv -u '{}' "$OUT" ';' |