diff options
author | Azat Bahawi <azahi@teknik.io> | 2020-07-26 16:58:03 +0300 |
---|---|---|
committer | Azat Bahawi <azahi@teknik.io> | 2020-07-26 16:58:03 +0300 |
commit | 375a0d6e5f5629261e575cab065afaf7a001b0e5 (patch) | |
tree | cc1ed6f2c16ecd7df8c07b33eaa86705f58b8480 | |
parent | Revert xmobar behaviour (diff) |
Prefer stack build
Diffstat (limited to '')
-rwxr-xr-x | build | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/build b/build index be60f9c..b159f44 100755 --- a/build +++ b/build @@ -8,8 +8,15 @@ shift cd "$SRC_DIR" || exit 1 -if command -v cabal >/dev/null 2>&1 +if command -v stack >/dev/null 2>&1 then + unset STACK_YAML + + echo ">>> stack build <<<" + stack build --verbose || exit 1 + + ln -f -T "$(stack exec -- which $EXE_NAME)" "$OUT" || exit 1 +else #echo ">>> cabal sandbox init <<<" #cabal sandbox --verbose init || exit 1 @@ -27,11 +34,4 @@ then find "$SRC_DIR"/dist-newstyle -type f -executable -name "$EXE_NAME" \ -exec mv -u '{}' "$OUT" ';' || exit 1 -else - unset STACK_YAML - - echo ">>> stack build <<<" - stack build --verbose || exit 1 - - ln -f -T "$(stack exec -- which $EXE_NAME)" "$1" || exit 1 fi |