Changeset 23257

Show
Ignore:
Timestamp:
01.11.2010 10:49:32 (9 years ago)
Author:
sjm84
Message:

More uninstaller modifications

Location:
main/trunk/release-kits/shared/core/uninstaller
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/release-kits/shared/core/uninstaller/Uninstall.sh

    r23247 r23257  
    1 if [ -f "../setup.bash" ]; then 
     1cd .. 
     2if [ -f "setup.bash" ]; then 
    23    #This is Greenstone 2 
    3     . ../setup.bash > /dev/null 
     4    . ./setup.bash > /dev/null 
    45    SEARCH4J_EXECUTABLE=$GSDLHOME/bin/$GSDLOS/search4j 
    56 
    6 elif [ -f "../gs2build/setup.bash" ]; then 
     7elif [ -f "gs2build/setup.bash" ]; then 
    78    #This is Greenstone 3 
    8     . ../gs2build/setup.bash > /dev/null 
    9     SEARCH4J_EXECUTABLE=../bin/search4j 
     9    . ./gs2build/setup.bash > /dev/null 
     10    SEARCH4J_EXECUTABLE=./bin/search4j 
    1011 
    1112else 
     
    1516fi 
    1617 
    17 if [ $GSDLOS = linux ]; then 
    18     "$SEARCH4J_EXECUTABLE" -p ../packages/jre -l ./uninst.jar 
    19 elif [ $GSDLOS = darwin ]; then 
    20     "$SEARCH4J_EXECUTABLE" -p /System/Library/Frameworks/JavaVM.framework/Home -l ./uninst.jar 
     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 
    2122fi 
    2223 
    2324if [ -e "uninst.flag" ]; then 
    2425 
    25     rm -rf ../packages/jre &> /dev/null 
    26     rmdir ../packages &> /dev/null 
     26    rm -rf packages/jre &> /dev/null 
     27    rmdir packages &> /dev/null 
    2728     
    28     rm -rf ../bin &> /dev/null 
    29     rm -rf ../tmp &> /dev/null 
    30     rm -rf ../uninstall &> /dev/null 
     29    rm -rf bin &> /dev/null 
     30    rm -rf tmp &> /dev/null 
     31    rm -rf uninstall &> /dev/null 
    3132 
    32     if [ -e "../llssite.cfg" ] ; then 
    33         rm ../llssite.cfg &> /dev/null 
     33    if [ -e "llssite.cfg" ] ; then 
     34        rm llssite.cfg &> /dev/null 
    3435    fi 
    3536 
    36     if [ -e "../glisite.cfg" ] ; then 
    37         rm ../glisite.cfg &> /dev/null 
     37    if [ -e "glisite.cfg" ] ; then 
     38        rm glisite.cfg &> /dev/null 
    3839    fi 
    3940     
    40     cd .. 
    4141    CONTENTS=`ls` 
    4242    if [ -z "$CONTENTS" ]; then 
  • main/trunk/release-kits/shared/core/uninstaller/Uninstaller.java

    r23242 r23257  
    4444    public static final ResourceBundle bundle = ResourceBundle.getBundle("resources.LanguagePack"); 
    4545 
    46     public static final File gs2InstallProps = new File("../etc/installation.properties"); 
    47     public static final File gs3InstallProps = new File("../installation.properties"); 
     46    public static final File gs2InstallProps = new File("etc/installation.properties"); 
     47    public static final File gs3InstallProps = new File("installation.properties"); 
    4848 
    4949    boolean keepCollections = true; 
     
    335335 
    336336            //never delete the things we are currently running 
    337             exceptions.add( new File("../bin/search4j.exe") ); 
    338             exceptions.add( new File("../bin/search4j") ); 
    339  
    340             exceptions.add( new File("../bin/windows/search4j.exe") ); 
    341             exceptions.add( new File("../bin/linux/search4j") ); 
    342             exceptions.add( new File("../bin/darwin/search4j") ); 
    343  
    344             exceptions.add( new File("../packages/jre") ); 
    345             exceptions.add( new File("../uninstall") ); 
     337            exceptions.add( new File("bin/search4j.exe") ); 
     338            exceptions.add( new File("bin/search4j") ); 
     339 
     340            exceptions.add( new File("bin/windows/search4j.exe") ); 
     341            exceptions.add( new File("bin/linux/search4j") ); 
     342            exceptions.add( new File("bin/darwin/search4j") ); 
     343 
     344            exceptions.add( new File("packages/jre") ); 
     345            exceptions.add( new File("uninstall") ); 
    346346 
    347347            if ( keepCollections ) { 
    348                 exceptions.add( new File("../web/sites/localsite/collect") ); 
    349                 exceptions.add( new File("../collect") ); 
     348                exceptions.add( new File("web/sites/localsite/collect") ); 
     349                exceptions.add( new File("collect") ); 
    350350            } 
    351351 
     
    446446                 
    447447                for(int j=0; j < paths.length; j++) { 
    448                     recursiveDelete( new File(".." + File.separator + paths[j]), exceptions ); 
     448                    recursiveDelete( new File(paths[j]), exceptions ); 
    449449                } 
    450450            }