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

Last change on this file since 23246 was 23246, checked in by sjm84, 14 years ago

The uninstaller will now delete llssite.cfg

File size: 1.0 KB
RevLine 
[23210]1if [ -f "../setup.bash" ]; then
[17808]2 #This is Greenstone 2
[23210]3 . ../setup.bash > /dev/null
[17794]4 SEARCH4J_EXECUTABLE=$GSDLHOME/bin/$GSDLOS/search4j
[17808]5
[23210]6elif [ -f "../gs2build/setup.bash" ]; then
[17808]7 #This is Greenstone 3
[23210]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
[23210]18 "$SEARCH4J_EXECUTABLE" -p ../packages/jre -l ./uninst.jar
[17794]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
[23210]25 rm -rf ../packages/jre &> /dev/null
26 rmdir ../packages &> /dev/null
[17456]27
[23210]28 rm -rf ../bin &> /dev/null
[23217]29 rm -rf ../tmp &> /dev/null
30 rm -rf ../uninstall &> /dev/null
[23245]31
32 if [ -e "../llssite.cfg" ] ; then
33 rm ../llssite.cfg &> /dev/null
34 fi
[23246]35
[23210]36 cd ..
[17456]37 CONTENTS=`ls`
[17730]38 if [ -z "$CONTENTS" ]; then
[17456]39 GSDEL=`pwd`
40 cd ..
[17808]41 rmdir $GSDEL &> /dev/null
[17456]42 fi
[17758]43fi
Note: See TracBrowser for help on using the repository browser.