| 1 |
#!/bin/sh -e |
| 2 |
# |
| 3 |
# Workaround for a mozdev cvs tagging bug, see |
| 4 |
# https://www.mozdev.org/bugs/show_bug.cgi?id=14797 |
| 5 |
# and |
| 6 |
# http://www.mozdev.org/drupal/wiki/MozdevCVSTipsTroubleshooting |
| 7 |
# for details |
| 8 |
|
| 9 |
set -o errexit |
| 10 |
|
| 11 |
if [ -z $1 ]; then |
| 12 |
echo "Enter CVS username" |
| 13 |
exit |
| 14 |
fi |
| 15 |
|
| 16 |
CVS_USERNAME=$1 |
| 17 |
CVSROOT=":pserver:${CVS_USERNAME}@www.mozdev.org:/cvs" |
| 18 |
CVS_MODULE_NAME="bidiui" |
| 19 |
SRCDIR=`pwd` |
| 20 |
# the following are paths relative to the source dir ${SRCDIR} |
| 21 |
TEMPDIR="${SRCDIR}/tmp" |
| 22 |
|
| 23 |
# determine version number |
| 24 |
VERSION=`grep VERSION=\" dobuild | cut -d\" -f2 | head -1` |
| 25 |
SHORTNAME=`grep SHORTNAME=\" dobuild | cut -d\" -f2` |
| 26 |
USCORED_VERSION=`echo $VERSION | tr . _` |
| 27 |
CAPS_SHORTNAME=`echo ${SHORTNAME} | tr a-z A-Z` |
| 28 |
RELEASE_TAG="${CAPS_SHORTNAME}_RELEASE_${USCORED_VERSION}" |
| 29 |
|
| 30 |
if [ ! -d ${TEMPDIR} ]; then |
| 31 |
mkdir ${TEMPDIR} |
| 32 |
fi |
| 33 |
cd ${TEMPDIR} |
| 34 |
cvs -d $CVSROOT export -r ${RELEASE_TAG} -d ${CVS_MODULE_NAME} ${CVS_MODULE_NAME}/source |
| 35 |
cd ${SRCDIR} |
| 36 |
rm -r ${TEMPDIR} |
| 37 |
|