File:  [mozdev] / googlebar / CreateXPI.sh
Revision 1.7: download - view: text, annotated - select for diffs - revision graph
Wed May 12 20:27:57 2004 UTC (15 years, 7 months ago) by johnrw
Branches: MAIN
CVS tags: ver_0_9_9_01, ver_0_9_8_01, ver_0_9_7_01, ver_0_9_6_03, ver_0_9_5_06, HEAD
ok Bernd, I tested it and made a small change using posix
strict advice from the bash man page. My bash said it didn't understand
==, but it went ahead anyway, and it worked. I just didn't feel to
good about the error msg.

#!/bin/sh
######################################################################
# This is a first version of a Linux createXPI script
# It does not have any fance commandline options like createXPI.bat
# but it should basically be able to create XPI-rimental.xpi installers
# with it. Please test!
# ok, it complained about == and seems to accept one equal for
# comparison, and an assignment is not done... copy rvalue to lvalue
# it functions the same though... != = is strict posix.

# Default filename
xpi=XPI-rimental.xpi
update=0

# TODO: help output
if [ $1x = -hx ] ; then
echo 
echo "Usage: $0 [-u] [versionString]"
echo
echo "       -u:            update from cvs before packing"
echo
echo "       versionString: create XPI named versionString.xpi"
echo "                      Without this option, the installer is called"
echo "                      XPI-rimental.xpi"
echo 
exit 1
fi

while [ $1x != x ] ; do
  if [ $1x = -ux ] ; then
    update=1
  else 
    xpi=$1.xpi
  fi

  shift
done

cd googlebar

##############################################
# get latest cvs version
##############################################
if [ $update = 1 ] ; then
  echo "Updating from cvs"
  cvs update -dP
fi

echo "... creating $xpi"
rm -f $xpi

#############################################
# fix case of en-us directory
# Changed foldername in repository to en-US
# cd googlebar/locale
# mv en-us en-US
# cd ../..

# zip everything excluding CVS directories and
# unneeded locale directory
zip -q -r -9 $xpi ./* -x \*CVS\* -x \*OLDen-us\*

##############################################
# move installer to www and downloads
##############################################
echo "... copying installers"
mv $xpi ../downloads

echo "... cleaning up"
cd googlebar/locale

# Don't need this part now... mv en-US en-us
cd ../..
cd ..

echo 
echo $xpi was placed in the downloads directory.

exit 0

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