Merge remote-tracking branch 'origin/merge-requests/49'

This commit is contained in:
Julian Ospald 2020-11-28 12:46:16 +01:00
commit 5fd30b412b
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,9 @@
# Revision history for ghcup
## WIP
* Fix to `ghcup` directory creation and placement for the XDG install mode.
## 0.1.12 -- 2020-11-21
* Fix disappearing HLS symlinks wrt #91

View File

@ -19,7 +19,7 @@
export GHCUP_USE_XDG_DIRS
if [ -n "${GHCUP_USE_XDG_DIRS}" ] ; then
GHCUP_DIR=${XDG_DATA_HOME:=$HOME/.local}/ghcup
GHCUP_DIR=${XDG_DATA_HOME:=$HOME/.local/share}/ghcup
GHCUP_BIN=${XDG_BIN_HOME:=$HOME/.local/bin}
else
GHCUP_DIR=${GHCUP_INSTALL_BASE_PREFIX}/.ghcup
@ -34,8 +34,7 @@ die() {
exit 2
}
edo()
{
edo() {
"$@" || die "\"$*\" failed!"
}
@ -125,6 +124,7 @@ download_ghcup() {
edo chmod +x "${GHCUP_BIN}"/ghcup
edo mkdir -p "${GHCUP_DIR}"
cat <<-EOF > "${GHCUP_DIR}"/env || die "Failed to create env file"
export PATH="\$HOME/.cabal/bin:${GHCUP_BIN}:\$PATH"
EOF