From 375a0d6e5f5629261e575cab065afaf7a001b0e5 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 26 Jul 2020 16:58:03 +0300 Subject: Prefer stack build --- build | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'build') 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 -- cgit 1.4.1