Merge remote-tracking branch 'origin/manpages'

This commit is contained in:
Julian Ospald 2020-01-09 19:27:09 +01:00
commit b2a5ce1ea4
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
2 changed files with 14 additions and 0 deletions

View File

@ -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

13
ghcup
View File

@ -1548,6 +1548,15 @@ 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
# 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") -sf ghc/"${myghcver}"/share "${BIN_LOCATION}/../share"
fi
status_message "Done"
@ -1661,6 +1670,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:"