Skip to content
Snippets Groups Projects
Commit d8f2478b authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

Added Uninstaller

parent 6aaa17c7
No related branches found
Tags 2007-11-11
No related merge requests found
This diff is collapsed.
<pkmkdoc spec="1.12"><properties><title>Glasgow Haskell Compiler</title><build>/Users/chak/Desktop/Glasgow Haskell Compiler.pkg</build><organization>org.haskell</organization><userSees ui="easy"/><min-target os="3"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>The Glasgow Haskell Compiler (GHC) is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell. GHC supports the entire Haskell 98 language plus a wide variety of extensions. GHC generates fast code, is available on a range of platforms, and includes an extensive set of libraries. For more information, please consult &lt;http://haskell.org/ghc>.</description><contents><choice title="GHC" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.haskell.glasgowHaskellCompiler.ghc.pkg"/><choice-reqs><requirement id="file" operator="eq" value="true" selected="no" enabled="no" hidden="unchanged" startSelected="unchanged" startEnabled="unchanged" startHidden="unchanged"><file>/usr/bin/gcc</file></requirement></choice-reqs></choice></contents><resources bg-scale="none" bg-align="center"><locale lang="en"><resource relative="true" mod="true" type="background">lambda-logo.png</resource><resource relative="true" mod="true" type="license">../../LICENSE</resource><resource mime-type="text/rtf" kind="embedded" type="welcome"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf949
<pkmkdoc spec="1.12"><properties><title>Glasgow Haskell Compiler</title><build>/Users/chak/Desktop/Glasgow Haskell Compiler.pkg</build><organization>org.haskell</organization><userSees ui="easy"/><min-target os="3"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>The Glasgow Haskell Compiler (GHC) is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell. GHC supports the entire Haskell 98 language plus a wide variety of extensions. GHC generates fast code, is available on a range of platforms, and includes an extensive set of libraries. For more information, please consult &lt;http://haskell.org/ghc>.</description><contents><choice title="GHC" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.haskell.glasgowHaskellCompiler.ghc.pkg"/><pkgref id="org.haskell.glasgowHaskellCompiler.uninstaller.pkg"/><choice-reqs><requirement id="file" operator="eq" value="true" selected="no" enabled="no" hidden="unchanged" startSelected="unchanged" startEnabled="unchanged" startHidden="unchanged"><file>/usr/bin/gcc</file></requirement></choice-reqs></choice></contents><resources bg-scale="none" bg-align="center"><locale lang="en"><resource relative="true" mod="true" type="background">lambda-logo.png</resource><resource relative="true" mod="true" type="license">../../LICENSE</resource><resource mime-type="text/rtf" kind="embedded" type="welcome"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf949
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
......@@ -20,4 +20,8 @@ Xcode can be installed off your Mac OS X installation DVD or be downloaded from
\
Extensive documentation is available online at\
\
http://haskell.org/haskellwiki/GHC}]]></resource></locale></resources><flags/><item type="file">01ghc.xml</item><mod>properties.userDomain</mod><mod>properties.title</mod><mod>description</mod><mod>properties.systemDomain</mod><mod>properties.anywhereDomain</mod></pkmkdoc>
\ No newline at end of file
http://haskell.org/haskellwiki/GHC\
\
To uninstall, execute\
\
/Library/Frameworks/GHC.framework/Tools/Uninstaller}]]></resource></locale></resources><flags/><item type="file">01ghc.xml</item><item type="file">02uninstaller.xml</item><mod>properties.userDomain</mod><mod>properties.title</mod><mod>description</mod><mod>properties.systemDomain</mod><mod>properties.anywhereDomain</mod></pkmkdoc>
\ No newline at end of file
#!/bin/sh
# Uninstaller script for GHC.framework
# (currently only for system volume installations)
INSTALL_DEST=/Library/Frameworks
INSTALL_BASE=/
if [ ${INSTALL_BASE} = / ]; then
INSTALL_BIN=/usr/bin
else
INSTALL_BIN=${INSTALL_BASE}/bin
fi
if [ ! -x ${INSTALL_DEST}/GHC.framework ]; then
echo "${INSTALL_DEST}/GHC.framework does not exit"
exit 1
fi
if [ ${USER} != root ]; then
echo "GHC.framework installer must be run with admin privileges"
echo "Prefix command by 'sudo'"
exit 1
fi
VERSIONS=(`ls ${INSTALL_DEST}/GHC.framework/Versions`)
NO_VERSIONS=${#VERSIONS[@]}
if [ ${VERSIONS[${NO_VERSIONS}-1]} != Current ]; then
echo "Fatal error: last version should be Current"
echo "Found versions: ${VERSIONS[@]}"
exit 1
fi
CURRENT_PHYS=`cd /Library/Frameworks/GHC.framework/Versions/Current; pwd -P`
CURRENT=`basename ${CURRENT_PHYS}`
if [ ${NO_VERSIONS} -ne 2 ]; then
echo "Multiple versions of GHC.framework are currently installed."
echo "This uninstaller removes GHC.framework entirely and should only"
echo "be used if there is exactly one version."
echo
echo "To remove individual old versions, simply delete the directory"
echo "${INSTALL_DEST}/GHC.framework/Versions/VERSION_TO_REMOVE"
echo
echo "Found versions: ${VERSIONS[@]}(= ${CURRENT})"
exit 1
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}
fi
done
echo "Removing ${INSTALL_DEST}/GHC.framework"
rm -rf ${INSTALL_DEST}/GHC.framework
echo "Removing package recipts"
rm -f /Library/Receipts/boms/org.haskell.glasgowHaskellCompiler.ghc.pkg.bom
rm -f /Library/Receipts/boms/org.haskell.glasgowHaskellCompiler.uninstaller.pkg
echo "${INSTALL_DEST}/GHC.framework has been purged!"
......@@ -7,7 +7,7 @@ INSTALL_DEST=$2
INSTALL_BASE=$3
if [ ${INSTALL_BASE} = / ]; then
INSTALL_BIN=${INSTALL_BASE}/usr/bin/
INSTALL_BIN=/usr/bin/
else
INSTALL_BIN=${INSTALL_BASE}/bin/
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment