Symlink share directory on ghcup set

Setting a default ghc version now creates a symlink from
~/.ghcup/ghc/<version>/share to ~/.ghcup/share so man
can find the manpage of the set ghc.
This commit is contained in:
Jan Felix Langenbach 2019-12-03 22:43:20 +01:00
parent c19f69d41b
commit dc14846276
1 changed files with 4 additions and 0 deletions

4
ghcup
View File

@ -1540,6 +1540,10 @@ set_ghc() {
# shellcheck disable=SC2046
edo ln $(optionv "-v") -sf "haddock-ghc${target_suffix}" "${BIN_LOCATION}/haddock${target_suffix}"
fi
if [ -n "${target_suffix}" ] && [ -f "${inst_location}/share" ] ; then
# shellcheck disable=SC2046
edo ln $(optionv "-v") -sf ghc/"${myghcver}"/share "${BIN_LOCATION}/../share"
fi
status_message "Done"