OxFF/build.sh

24 lines
762 B
Bash
Raw Normal View History

2010-08-03 20:49:30 +00:00
#!/bin/bash
cd `dirname $0`
release=`bzr tags | grep ".0 " | tail -1 | awk '{print $1}' | cut -d- -f2| tr "." " " |awk '{print $1"."$2}'`
release_rev=`bzr tags | grep ".0 " | tail -1 | awk '{print $2}'`
current_rev=`bzr revno`
version=$release.`printf %02d $(( $current_rev-$release_rev ))`
#update idl file
./src/make.sh
mkdir -p dist
sed -i "s/version: \".*\"/version: \"$version\"/g" OxFF/components/OxFF.js
sed -i "s/em:version>.*<\/em:version/em:version>$version<\/em:version/g" OxFF/install.rdf
rm -f dist/OxFF-$version.xpi
zip -9 -r dist/OxFF-$version.xpi * \
-x \*.~1~ -x \*.orig
#cleanup
sed -i "s/version: \".*\"/version: \"bzr\"/g" OxFF/components/OxFF.js
sed -i "s/em:version>.*<\/em:version/em:version>bzr<\/em:version/g" OxFF/install.rdf