X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustrecvs;h=4436462b5c895e1fdcddc9f88a8b20e414ec0a6e;hp=70ac2a038e1805f3afec84ae46970a7051f63721;hb=87c86d444e61e38d6454bba5700ba966dc1ac83d;hpb=7b16772ac5bd3a3e0b5c7c52d96f261be9b22263 diff --git a/lustrecvs b/lustrecvs index 70ac2a0..4436462 100755 --- a/lustrecvs +++ b/lustrecvs @@ -1,5 +1,6 @@ #!/bin/sh +LC_COLLATE="C" progname="${0##*/}" warn () @@ -18,13 +19,29 @@ fatal () usage () { cat < + where 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 '') @@ -48,11 +65,11 @@ esac cvs_cmd () { - local dir="$1" - local module="$2" - local tag="$3" - local cotag="" - local update="" + dir="$1" + module="$2" + tag="$3" + cotag="" + update="" if [ "$tag" = "HEAD" ] ; then cotag="" @@ -64,10 +81,10 @@ cvs_cmd () if [ -d "$dir" ] ; then echo "$progname: Updating $dir to $tag" - ( cd "$dir" && cvs up $uptag ) + ( 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 }