summaryrefslogtreecommitdiff
path: root/.gitlab/ci.sh
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab/ci.sh')
-rwxr-xr-x.gitlab/ci.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 1ddd0b1a50..22253e974c 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -168,13 +168,13 @@ function show_tool() {
}
function set_toolchain_paths() {
- needs_toolchain=1
+ needs_toolchain="1"
case "$(uname)" in
Linux) needs_toolchain="0" ;;
*) ;;
esac
- if [[ "$needs_toolchain" = 1 ]]; then
+ if [[ "$needs_toolchain" = "1" ]]; then
# These are populated by setup_toolchain
GHC="$toolchain/bin/ghc$exe"
CABAL="$toolchain/bin/cabal$exe"
@@ -185,9 +185,9 @@ function set_toolchain_paths() {
# we provide these handy fallbacks in case the
# script isn't run from within a GHC CI docker image.
if [ -z "$GHC" ]; then GHC="$(which ghc)"; fi
- if [ -z "$CABAL" ]; then GHC="$(which cabal)"; fi
- if [ -z "$HAPPY" ]; then GHC="$(which happy)"; fi
- if [ -z "$ALEX" ]; then GHC="$(which alex)"; fi
+ if [ -z "$CABAL" ]; then CABAL="$(which cabal)"; fi
+ if [ -z "$HAPPY" ]; then HAPPY="$(which happy)"; fi
+ if [ -z "$ALEX" ]; then ALEX="$(which alex)"; fi
fi
export GHC
@@ -204,7 +204,7 @@ function setup() {
cp -Rf cabal-cache/* "$cabal_dir"
fi
- if [[ -n "$needs_toolchain" ]]; then
+ if [[ "$needs_toolchain" = "1" ]]; then
setup_toolchain
fi
case "$(uname)" in