Skip to content
Snippets Groups Projects
Verified Commit 5fd30b41 authored by Julian Ospald's avatar Julian Ospald :tea:
Browse files

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

parents 824d2149 bbe2e876
No related branches found
No related tags found
1 merge request!49bootstrap-haskell: XDG: set proper GHCUP_DIR & create it
Pipeline #28043 passed
# 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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment