File:  [mozdev] / checkyesss / src / change_version.sh
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Fri Apr 21 14:10:09 2006 UTC (13 years, 7 months ago) by treitmayr
Branches: MAIN
CVS tags: release-0-6-9, release-0-6-8-20060303, release-0-6-8, release-0-6-7, release-0-6-6, release-0-6-5, release-0-6-4-20061106, release-0-6-4, release-0-6-3, release-0-6-2-20061027, release-0-6-15, release-0-6-14, release-0-6-13, release-0-6-12, release-0-6-11, release-0-6-10, release-0-6-1, release-0-6, release-0-5-7, release-0-5-6, release-0-5-5, release-0-5-4, release-0-5-3, prerelease-0-5-7-20060909, HEAD
version update

#!/bin/bash

OLDVERSION=`grep em:version install.rdf | sed 's/.*> *\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/'`

if [ -z "$1" -o "$1" = "-h" ] ; then
  tool=`basename $0`
  echo "$tool: Flip the version of CheckYesss extension"
  echo "	Usage: $tool <new-version>"
  echo "Note: Manual work is required for chrome/locale/<lang>/version_info.properties"
  echo ""
  echo "current version: $OLDVERSION"
  exit 1
fi

version=$1

echo "changing version from $OLDVERSION to $version"

sed 's/\(const *VERSION *= *\).*/\1"'$version'";/' install.js > .tmp
mv .tmp install.js

sed 's/\(<em:version>\).*\(<\/em:version>\)/\1'$version'\2/' install.rdf > .tmp
mv .tmp install.rdf

sed 's/\(dbbdd4ec.*:\).*"/\1'$version'"/' checkyesss.xml | \
  sed 's/\(<em:version>\).*\(<\/em:version>\)/\1'$version'\2/' > .tmp
mv .tmp checkyesss.xml

sed 's/".*"/"'$version'"/' chrome/content/version.dtd > .tmp
mv .tmp chrome/content/version.dtd

sed 's/=.*/='$version'/' chrome/content/version.properties > .tmp
mv .tmp chrome/content/version.properties

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