giacomo 2004/02/04 08:28:29
Modified: tools/bin create-repository-jars.sh
Log:
my cvs client gets confused when explicitly using HEAD as revision
Revision Changes Path
1.9 +27 -15 cocoon-2.1/tools/bin/create-repository-jars.sh
Index: create-repository-jars.sh
===================================================================
RCS file: /home/cvs/cocoon-2.1/tools/bin/create-repository-jars.sh,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -b -u -r1.8 -r1.9
--- create-repository-jars.sh 4 Feb 2004 16:09:11 -0000 1.8
+++ create-repository-jars.sh 4 Feb 2004 16:28:29 -0000 1.9
@@ -18,7 +18,7 @@
# In case of a HEAD revision a SNAPSHOT version will be created and
# any old snapshots will be removed to save some space
if [ "$REVISION" = "" ]; then
- REVISION=HEAD
+ REVISION="" # it's a HEAD
fi
# What is the default CVSROOT to be used for checkout
@@ -96,7 +96,7 @@
done
shift $(($OPTIND - 1))
-if [ "$1" != "" ]; then
+if [ "$1" != "" -a "$1" != "HEAD" ]; then
REVISION=$1
fi
@@ -106,10 +106,16 @@
if [ $NOCVS = 0 ]; then
echo
echo "updating the local repository at $LOCAL_REPOSITORY with"
+ if [ "$REVISION" = "" ]; then
+ echo " cvs up -dPAC"
+ echo
+ cvs up -dPAC
+ else
echo " cvs up -dPACr $REVISION"
echo
cvs up -dPACr $REVISION
fi
+ fi
else
DIRNAME=`dirname $LOCAL_REPOSITORY`
BASENAME=`basename $LOCAL_REPOSITORY`
@@ -119,9 +125,15 @@
cd $DIRNAME
echo
echo "checking out into the local repository at $LOCAL_REPOSITORY with "
+ if [ "$REVISION" = "" ]; then
+ echo " cvs -d $CVSROOT co -Pd $LOCAL_REPOSITORY $REPOSITORY_NAME"
+ echo
+ cvs -d $CVSROOT co -Pd $BASENAME $REPOSITORY_NAME
+ else
echo " cvs -d $CVSROOT co -Pd $LOCAL_REPOSITORY -r $REVISION
$REPOSITORY_NAME"
echo
cvs -d $CVSROOT co -Pd $BASENAME -r $REVISION $REPOSITORY_NAME
+ fi
cd $LOCAL_REPOSITORY
fi
@@ -176,7 +188,7 @@
# copy all the jars produced over to the remote repository space
VERSION=`ls build | grep cocoon | sed s/cocoon-//`
-if [ "$REVISION" = "HEAD" ]; then
+if [ "$REVISION" = "" ]; then
TVERSION=`date "+%Y%m%d.%H%M%S"`
else
TVERSION=$VERSION
@@ -195,12 +207,12 @@
else
BLOCKPART=`echo $FILE | sed 's/cocoon//'`
fi
- if [ "$REVISION" = "HEAD" ]; then
+ if [ "$REVISION" = "" ]; then
# remove all snapshots in the remote repository
SNAPSHOT=`ssh $REMOTEHOST "ls
$REMOTEPATH/jars/cocoon$BLOCKPART-????????.??????.jar 2>/dev/null"`
fi
scp $i $REMOTEHOST:$REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar
- if [ "$REVISION" = "HEAD" ]; then
+ if [ "$REVISION" = "" ]; then
if [ ! -z "$SNAPSHOT" ]; then
RM="rm $SNAPSHOT;"
else
@@ -226,11 +238,11 @@
ssh $REMOTEHOST "mkdir -p $REMOTEPATH/wars 2>/dev/null >/dev/null; \
chmod -R g+w $REMOTEPATH/wars"
WAR=build/cocoon-$VERSION/cocoon.war
- if [ "$REVISION" = "HEAD" ]; then
+ if [ "$REVISION" = "" ]; then
SNAPSHOT=`ssh $REMOTEHOST "ls
$REMOTEPATH/wars/cocoon-war-????????.??????.war 2>/dev/null"`
fi
scp $WAR $REMOTEHOST:$REMOTEPATH/wars/cocoon-war-$TVERSION.war
- if [ "$REVISION" = "HEAD" ]; then
+ if [ "$REVISION" = "" ]; then
if [ ! -z "$SNAPSHOT" ]; then
RM="rm $SNAPSHOT;"
else
@@ -256,7 +268,7 @@
chmod -R g+w $REMOTEPATH/distributions"
./build.sh clean-dist
cd ..
- if [ "$REVISION" = "HEAD" ]; then
+ if [ "$REVISION" = "" ]; then
TVERSION=SNAPSHOT
fi
ln -sf $REPOSITORY_NAME cocoon-src-$TVERSION