Changeset 20594


Ignore:
Timestamp:
2009-09-14T12:30:23+12:00 (15 years ago)
Author:
oranfry
Message:

changed makejar.sh to prepare the entire jar contents in the jar directory, this enables stripping of .svn directories before jarring and is probably a general good move anyway

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/makejar.sh

    r18635 r20594  
    4141echo "Assuming that Java code is freshly compiled..."
    4242
    43 # All the GLI class files and supporting libraries are put into the "jar" directory
    44 if [ ! -d jar ]; then
    45   mkdir jar
     43rm -rf jar
     44mkdir jar
    4645
    47   cd lib
    48   jar xf apache.jar com org
    49   jar xf qfslib.jar de
    50 
    51   mv com de org ../jar/.
    52   cd ..
    53 fi
     46# GLI class files and supporting libraries
     47cd lib
     48jar xf apache.jar com org
     49jar xf qfslib.jar de
     50mv com de org ../jar/.
     51cd ..
    5452
    5553# Copy the latest version of the GLI classes into the jar directory
     
    5856
    5957# Some of the things to go into the JAR file are optional, and may not exist
    60 optional=
    6158if [ -f collect.zip ]; then
    62     optional="$optional collect.zip"
     59  cp collect.zip jar
    6360fi
    6461
    6562# Recreate the metadata.zip file (contains the GLI metadata directory)
    6663rm -f metadata.zip
    67 zip -r metadata.zip metadata >/dev/null
     64zip -r jar/metadata.zip metadata >/dev/null
    6865
    69 # get the list of dictionary files
    70 dictionary_files=
     66# Dictionary files
    7167cd classes
    72 for dict_file in dictionary*.properties ; do
    73   dictionary_files="$dictionary_files -C classes $dict_file"
     68for dict_file in dictionary*.properties; do
     69    cp $dict_file jar
    7470done
    7571cd ..
    7672
     73# Other required directories and files
     74cp -r 'help' jar
     75cp -r 'classes/images' jar
     76cp -r 'classes/xml' jar
     77cp 'classes/feedback.properties' jar
     78cp '.java.policy' jar
     79
     80# Clean .svn dirs
     81find jar -name '.svn' -type d -exec rm -rf {} \;
     82
    7783# Jar everything up
    78 jar cf GLI.jar .java.policy metadata.zip $optional help \
    79     $dictionary_files  \
    80     -C classes feedback.properties -C classes images -C classes xml \
    81     -C jar com -C jar de -C jar org
    82 
    83 # Tidy up
    84 rm -f metadata.zip
     84cd jar
     85jar cf ../GLI.jar *
     86cd ..
    8587
    8688# Generate the GLIServer.jar file for remote building
    87 jar cf GLIServer.jar -C classes org/greenstone/gatherer/remote
     89jar cf GLIServer.jar -C jar org/greenstone/gatherer/remote
    8890
    8991# ---- Make signed JAR file for the applet, if desired ----
Note: See TracChangeset for help on using the changeset viewer.