summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-11-30 18:58:31 -0500
committerBen Gamari <ben@smart-cactus.org>2020-12-03 13:01:47 -0500
commite0b08c5f445f70381c854f78913489685feb224e (patch)
treeeb6ed849a94319d8fd289d62987be32cf003d271
parent41c64eb5db50c80e110e47b7ab1c1ee18dada46b (diff)
downloadhaskell-e0b08c5f445f70381c854f78913489685feb224e.tar.gz
gitlab-ci: Fix copy-paste error
Also be more consistent in quoting.
-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