#!/bin/sh DATE=`date +%Y%m%d` VERSION=$1 NAVPATH="../../mozilla-opt/mozilla/chimera/build/Navigator.app" TXTPATH="chimera_custom.txt" TGZPATH="chimera_custom.tgz" if [ x$VERSION == x ]; then echo "No version argument given to buildsit" exit 1; fi echo "Building Chimera_Custom_$VERSION.$DATE" chmod a+r $TXTPATH chmod a+r $TGZPATH ./maketar /usr/local/bin/dmg_backup --nolog --volprefix Chimera_ Custom.$VERSION $NAVPATH $TXTPATH $TGZPATH STAT=$? if [[ $STAT != 0 ]]; then echo "ERROR: dmg_backup exited with error" exit 1; fi FILE="/tmp/backup.Custom.$VERSION.$DATE.dmg" NEWFILE="./Chimera_Custom.$VERSION.dmg" hdiutil convert $FILE -o "$NEWFILE" -format UDZO if [[ $STAT != 0 ]]; then echo "ERROR: hdiutil convert exited with error" exit 1; fi SITFILE="${NEWFILE}.sit" if [ -e $SITFILE ]; then echo "WARNING: moving existing $SITFILE to .OLD" /bin/mv $SITFILE ${SITFILE}.OLD fi /usr/local/bin/stuff $NEWFILE if [[ $STAT != 0 ]]; then echo "ERROR: stuff exited with error" exit 1; fi chmod a+r $SITFILE