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

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

Better error message

  • Property svn:executable set to *
File size: 1.2 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 . ./gs3-setup.sh > /dev/null
11 SEARCH4J_EXECUTABLE=./bin/search4j
12
13else
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."
15 echo "To manually uninstall, please delete the entire Greenstone home folder."
16 exit
17fi
18
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
23fi
24
25if [ -e "uninst.flag" ]; then
26
27 rm -rf packages/jre &> /dev/null
28 rmdir packages &> /dev/null
29
30 rm -rf bin &> /dev/null
31 rm -rf tmp &> /dev/null
32 rm -rf uninstall &> /dev/null
33 rm uninst.flag
34
35 if [ -e "llssite.cfg" ] ; then
36 rm llssite.cfg &> /dev/null
37 fi
38
39 if [ -e "glisite.cfg" ] ; then
40 rm glisite.cfg &> /dev/null
41 fi
42
43 CONTENTS=`ls`
44 if [ -z "$CONTENTS" ]; then
45 GSDEL=`pwd`
46 cd ..
47 rmdir $GSDEL &> /dev/null
48 fi
49fi
Note: See TracBrowser for help on using the repository browser.