3 # GHC framework post-install script
4 # * Add links to all executables into the standard bin/ directory
5 # * Add link to the man page into the standard man/man1/ directory
6 # * Add link to the HTML docs into the standard share/doc/ directory
8 # The binary links are careful not to use Current, because that will be
9 # rebound to the current version on every reinstall.
11 # It probably won't ever happen, but this should work correctly if the install
12 # destination has a space on it.
14 # See apple "Install Operations" documentation for how this script is called.
19 if [ "$INSTALL_BASE" = / ]; then
23 VERSION=@ProjectVersion@-@TargetArch_CPP@
24 GHC_BASE="$INSTALL_DEST/GHC.framework/Versions/$VERSION"
26 INSTALL_BIN="$INSTALL_BASE/bin"
27 mkdir -p "$INSTALL_BIN"
28 if [ -d "$GHC_BASE/usr/bin" ]; then
29 ln -sf "$GHC_BASE"/usr/bin/* "$INSTALL_BIN/"
32 INSTALL_MAN1="$INSTALL_BASE"/share/man/man1
33 INSTALL_HTML="$INSTALL_BASE"/share/doc
34 mkdir -p "$INSTALL_MAN1"
35 if [ -d "$GHC_BASE"/usr/share/man/man1 ]; then
36 ln -sf "$GHC_BASE"/usr/share/man/man1/* "$INSTALL_MAN1/"
37 ln -sf "$GHC_BASE"/usr/share/doc/ghc "$INSTALL_HTML/"