Annotation of contactphotos/build.sh, revision 1.2

1.1       joshgeen    1: #!/bin/bash
                      2: 
                      3: # Contact Photos build script
                      4: # This script builds Contact Photos into an xpi that may be installed in
                      5: # compatible applications (Thunderbird & Seamonkey).
                      6: 
                      7: #***Start editing here***
                      8: 
                      9: # NOTE: The VERSION here is just used for the package name
                     10: # Edit install.rdf to change the actual VERSION
1.2     ! joshgeen   11: VERSION=0.1.9
1.1       joshgeen   12: SRC_DIR=./src
                     13: # Dest should be absolute or relative to SRC_DIR
                     14: DEST=$(pwd)/downloads/contactphotos-$VERSION.xpi
                     15: 
                     16: #***Stop editing here***
                     17: 
                     18: # Make sure the path to $DEST exists
                     19: if [ ! -d $(dirname $DEST) ]; then
                     20:   echo "The path to $DEST does not exist, trying mkdir"
                     21:   mkdir $(dirname $DEST)
                     22:   if [ "$?" != 0 ]; then
                     23:     exit 1
                     24:   fi
                     25: fi
                     26: 
                     27: # remove the existing zip file
                     28: if [ -f $DEST ]; then
                     29:   echo "Removing previous zip file at:"
                     30:   echo $DEST
                     31:   rm -f $DEST
                     32: fi
                     33: 
                     34: cd $SRC_DIR
                     35: 
                     36: # finds all files in locale/ excluding CVS directories and CVS files
                     37: LOCALE_FILES=$(find locale/ -maxdepth 2 -type f ! -name CVS ! -name Repository ! -name Root ! -name Entries)
                     38: 
                     39: # zip the source files
                     40: zip -r $DEST content/*.* defaults/preferences/*.* $LOCALE_FILES skin/*.* install.rdf chrome.manifest
                     41: 
                     42: # quit if zip failed
                     43: if [ "$?" != 0 ]; then
                     44:   echo "ERROR: zip failed, check '$DEST'"
                     45:   exit 1
                     46: fi
                     47: 
                     48: echo "Package ready at:"
                     49: echo $DEST
                     50: echo "MD5 checksum:"
                     51: md5sum $DEST
                     52: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>