X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fkernel_patches%2Fscripts%2Ftag-series;fp=lustre%2Fkernel_patches%2Fscripts%2Ftag-series;h=17f3dfe1634ea3f601369ee0a6ca15aec0d43997;hp=0000000000000000000000000000000000000000;hb=53e3148077f1d201a230ce5b5d0c66fd12632e53;hpb=b3baf7d24fcfe5f0921f52a6bf72d0b71a4d2154;ds=sidebyside diff --git a/lustre/kernel_patches/scripts/tag-series b/lustre/kernel_patches/scripts/tag-series new file mode 100755 index 0000000..17f3dfe --- /dev/null +++ b/lustre/kernel_patches/scripts/tag-series @@ -0,0 +1,41 @@ +#!/bin/sh + +# tag-series tagname series-file-name +# +# Does a `cvs tag tagname' of all the .pc, .txt and .patch files mentioned +# in series-file-name. Also tags series-file-name. +# + +. patchfns >/dev/null || . /usr/lib/patch-scripts/patchfns >/dev/null || { \ + echo "Impossible to find my library 'patchfns'." + echo "Check your install, or go to the right directory" + exit 1 +} + +# tag_one tag patchname +# +tag_one() +{ + PN=$(stripit $2) + if [ -r $P/txt/$PN.txt ] + then + cvs tag $1 $P/pc/$PN.pc $P/patches/$PN.patch $P/txt/$PN.txt + else + cvs tag $1 $P/pc/$PN.pc $P/patches/$PN.patch + fi +} + +if [ $# -ne 2 ] +then + echo Usage: tag-series tagname series-file-name + exit 1 +fi + +TAG=$1 +SERIES=$2 + +for p in $(cat $SERIES) +do + tag_one $TAG $p +done +cvs tag $TAG $SERIES