Annotation of liveurls/src/packager.sh, revision 1.8

1.1       knutties    1: #!/bin/bash
                      2: 
1.5       knutties    3: # convenience script to create Firefox extension
1.1       knutties    4: 
1.7       knutties    5: RELEASE_TEMP_DIR="/tmp/web-marker"
                      6: DEV_TEMP_DIR="${HOME}/tmp/web-marker"
1.2       knutties    7: MANIFEST="chrome.manifest"
1.8     ! knutties    8: VERSION="0.7"
1.6       knutties    9: DEV=0
1.2       knutties   10: 
1.7       knutties   11: TEMP_DIR=${RELEASE_TEMP_DIR}
                     12: 
1.2       knutties   13: function release_packager()
                     14: {
                     15:     dir=$1
                     16:     cd ${dir}
                     17:     cd chrome
                     18:     jar -cvf webmarker.jar *
                     19:     rm -rf skin content locale
                     20:     cd ..
1.5       knutties   21:     zip -r ../webmarker-${VERSION}.xpi *
1.2       knutties   22: }
                     23: 
                     24: function dev_packager()
                     25: {
                     26:     dir=$1
                     27:     cd ${dir}
                     28:     perl -pi -e 's/jar://g' chrome.manifest
                     29:     perl -pi -e 's/\/webmarker\.jar!//g' chrome.manifest
                     30: }
                     31: 
1.6       knutties   32: while getopts "d" type
                     33: do
                     34:    case $type in 
1.7       knutties   35:    d ) DEV=1; 
                     36:        TEMP_DIR=${DEV_TEMP_DIR};
                     37:        ;;
1.6       knutties   38:    esac
                     39: done
                     40: 
1.2       knutties   41: rm -rf ${TEMP_DIR}
                     42: mkdir -p ${TEMP_DIR}
                     43: cp -r web-marker/* ${TEMP_DIR}
                     44: cd ${TEMP_DIR}
1.1       knutties   45: find . -name CVS -print0 | xargs -0 rm -rf
1.7       knutties   46: 
1.6       knutties   47: if [ "${DEV}" == "0" ]; then
                     48:     # release packaging     
                     49:     release_packager ${TEMP_DIR}
                     50: else
                     51:     dev_packager ${TEMP_DIR}   
                     52: fi

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