From 00119a818b72bf45de708905934d565392930ef3 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Thu, 9 Jan 2020 16:37:42 +0100 Subject: [PATCH 1/3] Reinstate "Merge remote-tracking branch 'origin/merge-requestes/129'" --- ghcup | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ghcup b/ghcup index 94bfc81..c76bfe2 100755 --- a/ghcup +++ b/ghcup @@ -1548,6 +1548,10 @@ set_ghc() { # shellcheck disable=SC2046 edo ln $(optionv "-v") -sf "haddock-ghc${target_suffix}" "${BIN_LOCATION}/haddock${target_suffix}" fi + if [ -z "${target_suffix}" ] && [ -d "${inst_location}/share" ] ; then + # shellcheck disable=SC2046 + edo ln $(optionv "-v") -sfT ghc/"${myghcver}"/share "${BIN_LOCATION}/../share" + fi status_message "Done" @@ -1661,6 +1665,10 @@ rm_ghc() { fi done unset t known_tools + # remove dangling symlink to share directory + if [ -h "${BIN_LOCATION}/../share" ] && [ ! -e "${BIN_LOCATION}/../share" ] ; then + edo rm "${BIN_LOCATION}/../share" + fi warning_message "Done." warning_message "You may now want to set currently active GHC to a different version via:" From c3eb34922a0fe093a367aa7f6d6966c93ef27a10 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Thu, 9 Jan 2020 18:35:29 +0100 Subject: [PATCH 2/3] Fix up manpage handling --- ghcup | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ghcup b/ghcup index c76bfe2..f77197c 100755 --- a/ghcup +++ b/ghcup @@ -1549,8 +1549,13 @@ set_ghc() { edo ln $(optionv "-v") -sf "haddock-ghc${target_suffix}" "${BIN_LOCATION}/haddock${target_suffix}" fi if [ -z "${target_suffix}" ] && [ -d "${inst_location}/share" ] ; then + # Make sure we don't link "${BIN_LOCATION}/../share/share". + # POSIX doesn't allow '-T' for 'ln'. + if [ -e "${BIN_LOCATION}/../share" ] ; then + edo rm "${BIN_LOCATION}/../share" + fi # shellcheck disable=SC2046 - edo ln $(optionv "-v") -sfT ghc/"${myghcver}"/share "${BIN_LOCATION}/../share" + edo ln $(optionv "-v") -sf ghc/"${myghcver}"/share "${BIN_LOCATION}/../share" fi status_message "Done" From 93a94c5ffdcce946363b471ff2d846697c8c452b Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Thu, 9 Jan 2020 18:39:40 +0100 Subject: [PATCH 3/3] Improve documentation about manpages --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7ef598c..365312e 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ handles your haskell packages and can demand that [a specific version](https://c ### Manpages For man pages to work you need [man-db](http://man-db.nongnu.org/) as your `man` provider, then issue `man ghc`. Manpages only work for the currently set ghc. +`MANPATH` may be required to be unset. ## Design goals