OxFF/build.sh
2010-08-17 00:47:20 +02:00

25 lines
779 B
Bash
Executable file

#!/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
cd OxFF
zip -9 -r ../dist/OxFF-$version.xpi * \
-x \*.~1~ -x \*.orig
cd ..
#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