X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustrecvs;h=4436462b5c895e1fdcddc9f88a8b20e414ec0a6e;hp=bcce7796d2741a18dfc8f538f33a8dea05e25e72;hb=ee62631bb855a5389450710ac8f68e9ff455ab83;hpb=96ed3093ceb4f511fe112e10201d078eb137dd81 diff --git a/lustrecvs b/lustrecvs index bcce779..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 '') @@ -39,9 +56,6 @@ case "$lustretag" in # this is the branch table # keep this list sorted alphabetically! - b1_2) - portalstag="b1_2" - ;; *) buildtag="HEAD" @@ -51,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="" @@ -67,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 }