usage ()
{
cat <<EOF
-Usage: $progname command lustretag [other tags]
- where command is checkout, rtag, tag, or update
- where lustretag is a logical tag across the modules
+Usage: $progname lustretag
+ where lustretag is a tag of the lustre-core module
EOF
}
-case "$1" in
- '')
- warn "a command is required."
- usage >&2
- exit 1
- ;;
- --help | -h)
- usage
- exit 0
- ;;
- checkout | co | get | rtag | rt | rfreeze | tag | ta | freeze | update | up | upd)
- cvscommand="$1"
- ;;
- *)
- usage >&2
- exit 1
- ;;
-esac
+# portalstag="HEAD"
+buildtag="HEAD"
+portalstag="b1_4"
+lustretag="$1"
+libsysiotag="head_0607"
-case "$2" in
+case "$lustretag" in
'')
warn "a lustretag is required."
usage >&2
# this is the branch table
# keep this list sorted alphabetically!
- b1_4)
- portalstag="HEAD"
- lustretag="b1_4"
- ;;
b1_4_bgl)
portalstag="b1_4_bgl"
- lustretag="b1_4_bgl"
;;
- b_cray)
- portalstag="HEAD"
- lustretag="b_cray"
- ;;
- HEAD)
- portalstag="HEAD"
- lustretag="HEAD"
+
+ b_newsysio | b_sec)
+ libsysiotag="head_0809"
;;
- *)
- fatal 1 "This script does not contain branch information for $2. Please update the branch table if necessary."
+ b_port_step)
+ portalstag="b_port_step"
;;
+
esac
-cvs $cvscommand -r $portalstag portals
-cvs $cvscommand -r $lustretag -d lustre lustre-core
+cvs_cmd ()
+{
+ local dir="$1"
+ local module="$2"
+ local tag="$3"
+
+ if [ "$tag" != "HEAD" ] ; then
+ cvstag="-r $tag"
+ fi
+
+ if [ -d "$dir" ] ; then
+ echo "$progname: Updating $dir to $tag"
+ ( cd "$dir" && cvs up $cvstag )
+ else
+ echo "$progname: Checking out $dir from $tag"
+ cvs co $cvstag -d "$dir" "$module"
+ fi
+}
+
+cvs_cmd build lustre-build "$buildtag"
+cvs_cmd libsysio libsysio "$libsysiotag"
+cvs_cmd portals portals "$portalstag"
+cvs_cmd lustre lustre-core "$lustretag"