X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=distrib%2FMacOS%2Finstaller-scripts%2FUninstaller;h=696d571d7c04e4d0d23be0b370cf75b4b4cc75af;hb=637e621af0214877c98cb3ca5ae4dca5f737c316;hp=de4141be53b2664a3f37f46024f0b3c32f4ff7b7;hpb=160cec311bcb566640023124a97ca1d5a1b61a0d;p=ghc-hetmet.git diff --git a/distrib/MacOS/installer-scripts/Uninstaller b/distrib/MacOS/installer-scripts/Uninstaller index de4141b..696d571 100644 --- a/distrib/MacOS/installer-scripts/Uninstaller +++ b/distrib/MacOS/installer-scripts/Uninstaller @@ -5,11 +5,13 @@ INSTALL_DEST=/Library/Frameworks INSTALL_BASE=/ + if [ ${INSTALL_BASE} = / ]; then - INSTALL_BIN=/usr/bin -else - INSTALL_BIN=${INSTALL_BASE}/bin + INSTALL_BASE=/usr fi +INSTALL_BIN=${INSTALL_BASE}/bin +INSTALL_MAN1=${INSTALL_BASE}/share/man/man1 +INSTALL_HTML=${INSTALL_BASE}/share/doc if [ ! -x ${INSTALL_DEST}/GHC.framework ]; then echo "${INSTALL_DEST}/GHC.framework does not exit" @@ -46,9 +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 ${INSTALL_MAN1}/*; do + if ls -l "${thisfile}" | grep -q GHC.framework/Versions; then + rm -f "${thisfile}" + fi +done +for thisfile in ${INSTALL_HTML}/*; do + if ls -l "${thisfile}" | grep -q GHC.framework/Versions; then + rm -f "${thisfile}" fi done @@ -56,6 +68,8 @@ echo "Removing ${INSTALL_DEST}/GHC.framework" rm -rf ${INSTALL_DEST}/GHC.framework echo "Removing package recipt" +# The first is for Leopard packages and the second for Tiger packages. rm -f /Library/Receipts/boms/org.haskell.glasgowHaskellCompiler.ghc.pkg.bom +rm -rf /Library/Receipts/ghc.pkg echo "${INSTALL_DEST}/GHC.framework has been purged!"