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

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

The uninstaller will now also delete glisite.cfg if it exists

File size: 1.1 KB
Line 
1if [ -f "../setup.bash" ]; then
2 #This is Greenstone 2
3 . ../setup.bash > /dev/null
4 SEARCH4J_EXECUTABLE=$GSDLHOME/bin/$GSDLOS/search4j
5
6elif [ -f "../gs2build/setup.bash" ]; then
7 #This is Greenstone 3
8 . ../gs2build/setup.bash > /dev/null
9 SEARCH4J_EXECUTABLE=../bin/search4j
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
15fi
16
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
22
23if [ -e "uninst.flag" ]; then
24
25 rm -rf ../packages/jre &> /dev/null
26 rmdir ../packages &> /dev/null
27
28 rm -rf ../bin &> /dev/null
29 rm -rf ../tmp &> /dev/null
30 rm -rf ../uninstall &> /dev/null
31
32 if [ -e "../llssite.cfg" ] ; then
33 rm ../llssite.cfg &> /dev/null
34 fi
35
36 if [ -e "../glisite.cfg" ] ; then
37 rm ../glisite.cfg &> /dev/null
38 fi
39
40 cd ..
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.