bootstrap-haskell: create GHCUP_DIR

This commit is contained in:
Anton-Latukha 2020-11-27 20:14:43 +02:00
parent b20371c3ac
commit 3e2df2e111
No known key found for this signature in database
GPG Key ID: 3D84C07E91802E41

View File

@ -23,8 +23,7 @@ die() {
exit 2 exit 2
} }
edo() edo() {
{
"$@" || die "\"$*\" failed!" "$@" || die "\"$*\" failed!"
} }
@ -114,6 +113,7 @@ download_ghcup() {
edo chmod +x "${GHCUP_BIN}"/ghcup edo chmod +x "${GHCUP_BIN}"/ghcup
edo mkdir -p "${GHCUP_DIR}"
cat <<-EOF > "${GHCUP_DIR}"/env || die "Failed to create env file" cat <<-EOF > "${GHCUP_DIR}"/env || die "Failed to create env file"
export PATH="\$HOME/.cabal/bin:${GHCUP_BIN}:\$PATH" export PATH="\$HOME/.cabal/bin:${GHCUP_BIN}:\$PATH"
EOF EOF