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

Last change on this file since 23257 was 23257, checked in by sjm84, 13 years ago

More uninstaller modifications

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