From 8bde9b936506f264998473e8e5f02da66ccad2bc Mon Sep 17 00:00:00 2001 From: Sam Halliday Date: Wed, 28 Aug 2019 20:35:08 +0100 Subject: [PATCH 1/3] support compilation of ghc 8.8.1+ --- ghcup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghcup b/ghcup index e812fb6..f5ac0ab 100755 --- a/ghcup +++ b/ghcup @@ -1773,7 +1773,11 @@ compile_ghc() { edo ./boot - edo ./configure --prefix="${inst_location}" --with-ghc="${bootstrap_ghc}" + if echo "${myghcver}" | sed 's/[.]//g' | awk '{ exit ($0 < 881) ? 0 : 1 }' ; then + edo ./configure --prefix="${inst_location}" --with-ghc="${bootstrap_ghc}" + else + GHC=$(which ${bootstrap_ghc}) edo ./configure --prefix="${inst_location}" + fi emake -j${JOBS} emake install From cfa2986e0cb68b9e3fdb2c2cb5110645a531eadf Mon Sep 17 00:00:00 2001 From: Sam Halliday Date: Wed, 28 Aug 2019 21:04:39 +0100 Subject: [PATCH 2/3] shellcheck --- ghcup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcup b/ghcup index f5ac0ab..0348119 100755 --- a/ghcup +++ b/ghcup @@ -1776,7 +1776,7 @@ compile_ghc() { if echo "${myghcver}" | sed 's/[.]//g' | awk '{ exit ($0 < 881) ? 0 : 1 }' ; then edo ./configure --prefix="${inst_location}" --with-ghc="${bootstrap_ghc}" else - GHC=$(which ${bootstrap_ghc}) edo ./configure --prefix="${inst_location}" + GHC=$(which "${bootstrap_ghc}") edo ./configure --prefix="${inst_location}" fi emake -j${JOBS} emake install From b2e0db9031d100e8c769b1041cd1a1b9580899b5 Mon Sep 17 00:00:00 2001 From: Sam Halliday Date: Wed, 28 Aug 2019 21:17:40 +0100 Subject: [PATCH 3/3] fixup! shellcheck --- ghcup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcup b/ghcup index 0348119..dd047d9 100755 --- a/ghcup +++ b/ghcup @@ -1776,7 +1776,7 @@ compile_ghc() { if echo "${myghcver}" | sed 's/[.]//g' | awk '{ exit ($0 < 881) ? 0 : 1 }' ; then edo ./configure --prefix="${inst_location}" --with-ghc="${bootstrap_ghc}" else - GHC=$(which "${bootstrap_ghc}") edo ./configure --prefix="${inst_location}" + GHC=$(command -v "${bootstrap_ghc}") edo ./configure --prefix="${inst_location}" fi emake -j${JOBS} emake install