Whamcloud - gitweb
- CROW-related fixes from b_hd_mdref
[fs/lustre-release.git] / lustrecvs
index 9154775..4436462 100755 (executable)
--- a/lustrecvs
+++ b/lustrecvs
@@ -1,5 +1,6 @@
 #!/bin/sh
 
+LC_COLLATE="C"
 progname="${0##*/}"
 
 warn ()
@@ -18,13 +19,29 @@ fatal ()
 usage ()
 {
     cat <<EOF
-Usage: $progname lustretag
-  where lustretag is a tag of the lustre-core module
+Usage: $progname <lustretag>
+  where <lustretag> is a tag of the lustre-core module
 EOF
 }
 
+if [ -z "$LUSTRECVS_UPDATED" ] ; then
+    echo "$progname: updating lustrecvs"
+    cvs up -l || fatal 1 "Error updating lustrecvs"
+    export LUSTRECVS_UPDATED=yes
+    exec "$0" "$@"
+fi
+
+[ "$1" = "-r" ] && shift
+
 buildtag="HEAD"
 lustretag="$1"
+shift
+
+if [ "$*" ] ; then
+    usage >&2
+    exit 1
+fi
+
 
 case "$lustretag" in
     '')
@@ -67,7 +84,7 @@ cvs_cmd ()
        ( cd "$dir" && cvs up -dP $uptag )
     else
        echo "$progname: Checking out $dir from $tag"
-       cvs co $cotag -d "$dir" "$module"
+       cvs co -P $cotag -d "$dir" "$module"
     fi
 }