You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by je...@apache.org on 2003/06/21 05:51:35 UTC

cvs commit: xml-forrest/etc/cocoon_upgrade upgrade_cocoon_jars.sh

jefft       2003/06/20 20:51:35

  Modified:    etc/cocoon_upgrade upgrade_cocoon_jars.sh
  Log:
  Only do the cvs add/remove if CVS didn't fail
  
  Revision  Changes    Path
  1.12      +14 -5     xml-forrest/etc/cocoon_upgrade/upgrade_cocoon_jars.sh
  
  Index: upgrade_cocoon_jars.sh
  ===================================================================
  RCS file: /home/cvs/xml-forrest/etc/cocoon_upgrade/upgrade_cocoon_jars.sh,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- upgrade_cocoon_jars.sh	29 May 2003 08:57:40 -0000	1.11
  +++ upgrade_cocoon_jars.sh	21 Jun 2003 03:51:35 -0000	1.12
  @@ -22,7 +22,7 @@
   ## lib/core/, whereas 'testing' copies them to the distribution in
   ## build/dist/shbat/*
   UPGRADE_TYPE=testing
  -#UPGRADE_TYPE=real
  +UPGRADE_TYPE=real
   #
   ######################################################################
   
  @@ -213,13 +213,22 @@
   
   if [ "$UPGRADE_TYPE" = "real" ]; then
     UPDATEFILE=/tmp/forrest-updates
  +  pushd .
  +  cd $FORREST
  +  echo "Diffing against CVS.."
     cvs -n up > $UPDATEFILE
     # Add new jars
  -  echo "Marking new files for addition to CVS..."
  -  cat $UPDATEFILE | grep ^\? | cut -d\  -f 2 | xargs cvs add -kb
  +  NEWFILES=`cat $UPDATEFILE | grep ^\? | cut -d\  -f 2`
  +  OLDFILES=`cat $UPDATEFILE | grep ^U | cut -d\  -f 2`
  +  if [ ! -z "$NEWFILES" ]; then
  +      echo "Marking new files for addition to CVS:  $NEWFILES"
  +      cvs add -kb $NEWFILES
  +  fi
     # Remove old jars
  -  echo "Marking removed files for deletion from CVS..."
  -  cat $UPDATEFILE | grep ^U | cut -d\  -f 2 | xargs cvs remove -f
  +  if [ ! -z "$OLDFILES" ]; then
  +      echo "Marking removed files for deletion from CVS: $OLDFILES"
  +      cvs remove -f $OLDFILES
  +  fi
   fi
   
   echo "All done.  Upgraded Cocoon jars copied to:"