source: release-kits/shared/uninstaller/Uninstall.sh@ 17808

Last change on this file since 17808 was 17808, checked in by oranfry, 15 years ago

uninstaller fixes

File size: 974 bytes
RevLine 
[17730]1if [ -f "setup.bash" ]; then
[17808]2 #This is Greenstone 2
[17794]3 . ./setup.bash > /dev/null
4 SEARCH4J_EXECUTABLE=$GSDLHOME/bin/$GSDLOS/search4j
[17808]5
6elif [ -f "gs2build/setup.bash" ]; then
7 #This is Greenstone 3
[17794]8 . ./gs2build/setup.bash > /dev/null
9 SEARCH4J_EXECUTABLE=./bin/search4j
[17808]10
11else
12 echo "Couldn't find setup.bash. This copy of Greenstone appears to be corrupt."
13 echo "To manually uninstall, please delete the entire Greenstone home folder."
14 exit
[17730]15fi
[17456]16
[17794]17if [ $GSDLOS = linux ]; then
18 "$SEARCH4J_EXECUTABLE" -p ./packages/jre -l ./uninst.jar
19elif [ $GSDLOS = darwin ]; then
20 "$SEARCH4J_EXECUTABLE" -p /System/Library/Frameworks/JavaVM.framework/Home -l ./uninst.jar
21fi
[17730]22
[17456]23if [ -e "uninst.flag" ]; then
24
[17808]25 rm -rf packages/jre &> /dev/null
26 rmdir packages &> /dev/null
[17456]27
[17808]28 rm -rf bin &> /dev/null
[17456]29
[17808]30 rm uninst.jar &> /dev/null
31 rm uninst.flag &> /dev/null
32 rm Uninstall.* &> /dev/null
[17456]33
34 CONTENTS=`ls`
[17730]35 if [ -z "$CONTENTS" ]; then
[17456]36 GSDEL=`pwd`
37 cd ..
[17808]38 rmdir $GSDEL &> /dev/null
[17456]39 fi
[17758]40fi
Note: See TracBrowser for help on using the repository browser.