source: main/trunk/release-kits/shared/core/uninstaller/Uninstall.sh

Last change on this file was 26021, checked in by ak19, 12 years ago

Better error message

  • Property svn:executable set to *
File size: 1.2 KB
RevLine 
[23257]1cd ..
2if [ -f "setup.bash" ]; then
[17808]3 #This is Greenstone 2
[23257]4 . ./setup.bash > /dev/null
[17794]5 SEARCH4J_EXECUTABLE=$GSDLHOME/bin/$GSDLOS/search4j
[17808]6
[23257]7elif [ -f "gs2build/setup.bash" ]; then
[17808]8 #This is Greenstone 3
[25933]9# . ./gs2build/setup.bash > /dev/null
10 . ./gs3-setup.sh > /dev/null
[23257]11 SEARCH4J_EXECUTABLE=./bin/search4j
[17808]12
13else
[26021]14 echo "Couldn't find setup.bash. Either this script has not been run from the directory it resides in, or this copy of Greenstone appears to be corrupt."
[17808]15 echo "To manually uninstall, please delete the entire Greenstone home folder."
16 exit
[17730]17fi
[17456]18
[23257]19if [ "$GSDLOS" = "linux" ]; then
20 "$SEARCH4J_EXECUTABLE" -p ./packages/jre -l ./uninstall/uninst.jar
21elif [ "$GSDLOS" = "darwin" ]; then
22 "$SEARCH4J_EXECUTABLE" -p /System/Library/Frameworks/JavaVM.framework/Home -l ./uninstall/uninst.jar
[17794]23fi
[17730]24
[17456]25if [ -e "uninst.flag" ]; then
26
[23257]27 rm -rf packages/jre &> /dev/null
28 rmdir packages &> /dev/null
[17456]29
[23257]30 rm -rf bin &> /dev/null
31 rm -rf tmp &> /dev/null
32 rm -rf uninstall &> /dev/null
[23266]33 rm uninst.flag
[23245]34
[23257]35 if [ -e "llssite.cfg" ] ; then
36 rm llssite.cfg &> /dev/null
[23245]37 fi
[23247]38
[23257]39 if [ -e "glisite.cfg" ] ; then
40 rm glisite.cfg &> /dev/null
[23247]41 fi
[23246]42
[17456]43 CONTENTS=`ls`
[17730]44 if [ -z "$CONTENTS" ]; then
[17456]45 GSDEL=`pwd`
46 cd ..
[17808]47 rmdir $GSDEL &> /dev/null
[17456]48 fi
[17758]49fi
Note: See TracBrowser for help on using the repository browser.