diff options
author | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2008-02-11 09:11:19 +0000 |
---|---|---|
committer | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2008-02-11 09:11:19 +0000 |
commit | 894e4ba334c52e0da4ad85f30522a12ea77b2dc4 (patch) | |
tree | da6efc0d71a21713d5411cb1598958e43d96982e /distrib | |
parent | ba8ea9d3f3bb97c4f7a680c11374f4f49853f7b1 (diff) | |
download | haskell-894e4ba334c52e0da4ad85f30522a12ea77b2dc4.tar.gz |
Mac installer: make Uninstaller a bit more robust
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/MacOS/installer-scripts/Uninstaller | 18 | ||||
-rw-r--r-- | distrib/MacOS/installer-scripts/create-links | 16 |
2 files changed, 20 insertions, 14 deletions
diff --git a/distrib/MacOS/installer-scripts/Uninstaller b/distrib/MacOS/installer-scripts/Uninstaller index 0b79258f25..678fce8272 100644 --- a/distrib/MacOS/installer-scripts/Uninstaller +++ b/distrib/MacOS/installer-scripts/Uninstaller @@ -48,19 +48,19 @@ if [ ${NO_VERSIONS} -ne 2 ]; then fi echo "Removing symbolic links into GHC.framework" -for thisfile in `ls ${INSTALL_BIN}`; do - if ls -l ${INSTALL_BIN}/${thisfile} | grep -q GHC.framework/Versions; then - rm -f ${INSTALL_BIN}/${thisfile} +for thisfile in ${INSTALL_BIN}/*; do + if ls -l "${thisfile}" | grep -q GHC.framework/Versions; then + rm -f "${thisfile}" fi done -for thisfile in `ls ${INSTALL_MAN1}`; do - if ls -l ${INSTALL_MAN1}/${thisfile} | grep -q GHC.framework/Versions; then - rm -f ${INSTALL_MAN1}/${thisfile} +for thisfile in ${INSTALL_MAN1}/*; do + if ls -l "${thisfile}" | grep -q GHC.framework/Versions; then + rm -f "${thisfile}" fi done -for thisfile in `ls ${INSTALL_HTML}`; do - if ls -l ${INSTALL_HTML}/${thisfile} | grep -q GHC.framework/Versions; then - rm -f ${INSTALL_HTML}/${thisfile} +for thisfile in ${INSTALL_HTML}/*; do + if ls -l "${thisfile}" | grep -q GHC.framework/Versions; then + rm -f "${thisfile}" fi done diff --git a/distrib/MacOS/installer-scripts/create-links b/distrib/MacOS/installer-scripts/create-links index 7102f1261e..4453a9de4a 100644 --- a/distrib/MacOS/installer-scripts/create-links +++ b/distrib/MacOS/installer-scripts/create-links @@ -14,12 +14,18 @@ fi INSTALL_BIN=${INSTALL_BASE}/bin mkdir -p ${INSTALL_BIN} -ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/bin/* ${INSTALL_BIN}/ +if [ -d ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/bin ]; then + ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/bin/*\ + ${INSTALL_BIN}/ +fi INSTALL_MAN1=${INSTALL_BASE}/share/man/man1 INSTALL_HTML=${INSTALL_BASE}/share/doc mkdir -p ${INSTALL_MAN1} -ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/share/man/man1/*\ - ${INSTALL_MAN1}/ -ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/share/doc/ghc\ - ${INSTALL_HTML}/ +if [ -d ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/share/man/man1 ]; +then + ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/share/man/man1/*\ + ${INSTALL_MAN1}/ + ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/share/doc/ghc\ + ${INSTALL_HTML}/ +fi |