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
1 changed files with 2 additions and 3 deletions

View File

@ -12,8 +12,7 @@ die() {
edo()
{
(>&2 printf "\\033[0;35m%s\\033[0m\\n" "$*")
"$@" || exit 2
"$@" || die "\"$*\" failed!"
}
echo
@ -48,7 +47,7 @@ if command -V "ghcup" >/dev/null 2>&1 ; then
edo ghcup upgrade
fi
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
cat <<-EOF > "${GHCUP_INSTALL_BASE_PREFIX}"/.ghcup/env || die "Failed to create env file"