Be a little bit less verbose in bootstrap-haskell

This commit is contained in:
Julian Ospald 2019-04-11 10:42:29 +08:00
parent 8c1dfa3ba0
commit c4a8789ed3
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

View File

@ -12,8 +12,7 @@ die() {
edo() edo()
{ {
(>&2 printf "\\033[0;35m%s\\033[0m\\n" "$*") "$@" || die "\"$*\" failed!"
"$@" || exit 2
} }
echo echo
@ -48,7 +47,7 @@ if command -V "ghcup" >/dev/null 2>&1 ; then
edo ghcup upgrade edo ghcup upgrade
fi fi
else else
edo curl https://raw.githubusercontent.com/haskell/ghcup/master/ghcup > "${GHCUP_INSTALL_BASE_PREFIX}"/.ghcup/bin/ghcup edo curl --silent https://raw.githubusercontent.com/haskell/ghcup/master/ghcup > "${GHCUP_INSTALL_BASE_PREFIX}"/.ghcup/bin/ghcup
edo chmod +x "${GHCUP_INSTALL_BASE_PREFIX}"/.ghcup/bin/ghcup edo chmod +x "${GHCUP_INSTALL_BASE_PREFIX}"/.ghcup/bin/ghcup
cat <<-EOF > "${GHCUP_INSTALL_BASE_PREFIX}"/.ghcup/env || die "Failed to create env file" cat <<-EOF > "${GHCUP_INSTALL_BASE_PREFIX}"/.ghcup/env || die "Failed to create env file"