forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/forrestbot/scripts publish_livesite
Date Tue, 28 Jan 2003 11:21:04 GMT
jefft       2003/01/28 03:21:03

  Modified:    src/resources/forrestbot/scripts publish_livesite
  Log:
  Handle added directories
  
  Revision  Changes    Path
  1.3       +27 -15    xml-forrest/src/resources/forrestbot/scripts/publish_livesite
  
  Index: publish_livesite
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/scripts/publish_livesite,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- publish_livesite	28 Jan 2003 10:50:59 -0000	1.2
  +++ publish_livesite	28 Jan 2003 11:21:02 -0000	1.3
  @@ -4,7 +4,6 @@
   # A dubious script which commits generated website
   # contents to xml-site/targets/$MODULE 
   ###################################################
  -
   MODULE=${1:-xml-forrest}
   case $MODULE in
   	xml-forrest) TARGET="forrest" ;;
  @@ -29,24 +28,37 @@
   echo "Updating $LIVECVS from $SRC_DIR"
   pushd .
   cd $LIVECVS
  -cvsco
  -cvs up -dP
  +echo cvsco
  +echo cvs up -dP
   echo "Now copying $SRC_DIR/*"
   cp -r -p $SRC_DIR/* .
   echo "done"
  +
  +function addfiles()
  +{
  +  echo "addfiles $@"
  +  for i in $@; do
  +    echo "Processing $i.."
  +    if [ -d "$i" ]; then
  +      cvs add `find $i -type d`
  +      addfiles `find $i -type f`
  +      continue
  +    fi
  +    MIME=`file -bi $i`
  +    echo "New file $i has MIME type $MIME"
  +    if [ `echo "$MIME" | grep -q 'text'` ]; then
  +      echo "Adding $i as text"
  +      cvsdo add $i
  +    else
  +      echo "Adding $i as binary"
  +      cvs add -kb $i
  +    fi
  +  done
  +}
   NEW_FILES=`cvs up | grep '^\?' | cut -d\  -f 2`
  -for i in $NEW_FILES; do
  -  MIME=`file -bi $i`
  -  echo "New file $i has MIME type $MIME"
  -  if [ `echo "$MIME" | grep -q 'text'` ]; then
  -    echo "Adding $i as text"
  -    cvsdo add $i
  -  else
  -    echo "Adding $i as binary"
  -    cvs add -kb $i
  -  fi
  -done
  +addfiles $NEWFILES
  +
   cvs up > /tmp/cvslist 2>&1
  -cvs ci -m "Automatic publish at `date` by forrestrunner."
  +#cvs ci -m "Automatic publish at `date` by forrestrunner."
   #cvs ci
   popd
  
  
  

Mime
View raw message