From e0b08c5f445f70381c854f78913489685feb224e Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Mon, 30 Nov 2020 18:58:31 -0500 Subject: gitlab-ci: Fix copy-paste error Also be more consistent in quoting. --- .gitlab/ci.sh | 12 ++++++------ 1 file 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 -- cgit v1.2.1