root/main/trunk/release-kits/shared/core/uninstaller/Uninstall.sh @ 23272

Revision 23272, 1.1 KB (checked in by sjm84, 9 years ago)

Uninstall.sh is now executable be default

  • Property svn:executable set to *
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    rm uninst.flag
33
34    if [ -e "llssite.cfg" ] ; then
35        rm llssite.cfg &> /dev/null
36    fi
37
38    if [ -e "glisite.cfg" ] ; then
39        rm glisite.cfg &> /dev/null
40    fi
41   
42    CONTENTS=`ls`
43    if [ -z "$CONTENTS" ]; then
44        GSDEL=`pwd`
45        cd ..
46        rmdir $GSDEL &> /dev/null
47    fi
48fi
Note: See TracBrowser for help on using the browser.