Merge remote-tracking branch 'origin/merge-requests/49'
This commit is contained in:
commit
5fd30b412b
@ -1,5 +1,9 @@
|
|||||||
# Revision history for ghcup
|
# Revision history for ghcup
|
||||||
|
|
||||||
|
## WIP
|
||||||
|
|
||||||
|
* Fix to `ghcup` directory creation and placement for the XDG install mode.
|
||||||
|
|
||||||
## 0.1.12 -- 2020-11-21
|
## 0.1.12 -- 2020-11-21
|
||||||
|
|
||||||
* Fix disappearing HLS symlinks wrt #91
|
* Fix disappearing HLS symlinks wrt #91
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
export GHCUP_USE_XDG_DIRS
|
export GHCUP_USE_XDG_DIRS
|
||||||
|
|
||||||
if [ -n "${GHCUP_USE_XDG_DIRS}" ] ; then
|
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}
|
GHCUP_BIN=${XDG_BIN_HOME:=$HOME/.local/bin}
|
||||||
else
|
else
|
||||||
GHCUP_DIR=${GHCUP_INSTALL_BASE_PREFIX}/.ghcup
|
GHCUP_DIR=${GHCUP_INSTALL_BASE_PREFIX}/.ghcup
|
||||||
@ -34,8 +34,7 @@ die() {
|
|||||||
exit 2
|
exit 2
|
||||||
}
|
}
|
||||||
|
|
||||||
edo()
|
edo() {
|
||||||
{
|
|
||||||
"$@" || die "\"$*\" failed!"
|
"$@" || die "\"$*\" failed!"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,6 +124,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
|
||||||
|
Loading…
Reference in New Issue
Block a user