Skip to content

Commit

Permalink
Install GHCup with BOOTSTRAP_HASKELL_NONINTERACTIVE enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sestrella committed Dec 3, 2023
1 parent e603d88 commit 4893217
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
9 changes: 2 additions & 7 deletions bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@

set -euo pipefail

check_ghcup() {
if ! command -v ghcup &> /dev/null
then
echo "ghcup not found, installing..."
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
fi
}
# shellcheck source=../lib/utils.sh
source "$(dirname "$0")/../lib/utils.sh"

ver() {
echo "${1}" | awk -F . '{ printf("%02d%02d", $1,$2); }'
Expand Down
9 changes: 2 additions & 7 deletions bin/list-all
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@

set -euo pipefail

check_ghcup() {
if ! command -v ghcup &> /dev/null
then
echo "ghcup not found, installing..."
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
fi
}
# shellcheck source=../lib/utils.sh
source "$(dirname "$0")/../lib/utils.sh"

main() {
check_ghcup
Expand Down
7 changes: 7 additions & 0 deletions lib/utils.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
check_ghcup() {
if ! command -v ghcup &> /dev/null
then
echo "GHCup not found, installing..."
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | env BOOTSTRAP_HASKELL_NONINTERACTIVE=1 sh
fi
}

0 comments on commit 4893217

Please sign in to comment.