#!/bin/sh XPTFILE=../src/nsILibOggPlugin.xpt BUNDLE=../mac/build/Deployment/liboggplay.plugin CPU=$(system_profiler SPHardwareDataType | awk '/CPU Type/{print $3}') if [ "x$CPU" = "x" ]; then CPU=$(system_profiler SPHardwareDataType | awk '/Processor Name/{print $3}') fi XPINAME=Oggplay-MacOSX-$CPU.xpi if [ ! -e $XPTFILE ]; then echo "Could not find $XPTFILE" exit 1 fi if [ ! -d $BUNDLE ]; then echo "Could not find $BUNDLE" exit 1 fi cp -r $XPTFILE $BUNDLE . rm $XPINAME 2>/dev/null zip -9r $XPINAME install.js ${XPTFILE##.*/} ${BUNDLE##.*/} rm -r ${XPTFILE##.*/} ${BUNDLE##.*/}