Index: /trunk/psconfig/pstag
===================================================================
--- /trunk/psconfig/pstag	(revision 11600)
+++ /trunk/psconfig/pstag	(revision 11600)
@@ -0,0 +1,66 @@
+#!/bin/tcsh
+
+set args=""
+while ($#argv)
+ switch ($1)
+  default:
+   set args=($args $1);
+   breaksw;
+ endsw
+ shift
+end
+
+if ($#args != 1) goto usage
+if ("$args" == "") goto usage
+
+set group   = $args[1]
+set tagsets = tagsets/$group
+
+if (! -e $tagsets) then
+  echo "target $group not found in tagsets"
+  exit 2
+endif
+
+foreach target (`cat $tagsets | grep -v \#`)
+ set name = `echo $target | tr ':' ' '`
+ set dir = $name[1]
+ set tag = $name[2]
+
+ set current = `pwd`
+ cd ../$dir
+ 
+ echo ""
+ echo "***** updating $name ($target) *****"
+ pwd
+
+ switch ($tag)
+  case HEAD:
+   echo "HEAD is not a valid tag"
+   goto failure;
+   breaksw;
+  case NONE:
+   breaksw;
+  default:
+   cvs tag $tag $dir
+   if ($status) goto failure;
+   breaksw;
+ endsw
+
+ success:
+ cd $current
+end
+
+exit 0
+
+usage:
+  echo "USAGE: pstag (group)"
+  echo " applies the tags defined in the group file"
+  echo " tags may not be HEAD"
+  exit 2
+
+failure:
+  echo "pstag failed"
+  echo "target: $target"
+  echo "dir: $dir"
+  echo "tag: $tag"
+  exit 2
