Annotation of forward/src/make-amo.sh, revision 1.1

1.1     ! oeekker     1: #!/bin/bash
        !             2: # amo
        !             3: cd `dirname $0`/..
        !             4: [ -d package ] || mkdir package
        !             5: cd package
        !             6: rm -fr amo/
        !             7: rsync -a --exclude-from=../src/make-exclude.txt ../src/* amo/
        !             8: cd amo/chrome/locale
        !             9: for locale in *
        !            10: do
        !            11:   for file in ${locale}/*.properties
        !            12:   do
        !            13:     grep -q '=$' ${file}      # Check if file has untranslated strings
        !            14:     if [ $? -eq 0 ]
        !            15:     then
        !            16:       while read line
        !            17:       do
        !            18:         if expr index "${line}" '=' > /dev/null
        !            19:         then
        !            20:           untranslatedstring="#${line%%=*}=$"
        !            21:           untranslatedstring="${untranslatedstring/\#\#/\#}"
        !            22:           sed -r "s/${untranslatedstring//\//\\/}/${line//\//\\/}/" ${file} > ${file}.new
        !            23:           mv ${file}.new ${file}
        !            24:         fi
        !            25:       done < en-US/$(basename ${file})
        !            26:     fi
        !            27:   done
        !            28: done
        !            29: cd ..
        !            30: zip -r -D -0 forward.jar content/ locale/ skin/
        !            31: cd ../..
        !            32: grep em:update -A 2 ../src/install.rdf > make-grep.txt
        !            33: grep -v -f make-grep.txt ../src/install.rdf | grep -v em:unpack > amo/install.rdf
        !            34: rm make-grep.txt
        !            35: sed -r "s/chrome\//jar:chrome\/forward.jar!\//" ../src/chrome.manifest > amo/chrome.manifest
        !            36: version=`grep em:version ../src/install.rdf | sed -r "s/^[^\"]*\"//" | sed -r "s/\"[^\"]*$//"`
        !            37: cd amo
        !            38: rm forward-${version}-tb.xpi 2> /dev/null
        !            39: zip -r -D forward-${version}-tb.xpi install.rdf chrome.manifest chrome/forward.jar defaults/
        !            40: cd ..
        !            41: read -p "Press any key to continue . . . " -n 1

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