Whamcloud - gitweb
- bring in akpm's patch management scripts and a first cut at
[fs/lustre-release.git] / lustre / kernel_patches / scripts / tag-series
1 #!/bin/sh
2
3 # tag-series tagname series-file-name
4 #
5 # Does a `cvs tag tagname' of all the .pc, .txt and .patch files mentioned
6 # in series-file-name.  Also tags series-file-name.
7 #
8
9 . patchfns >/dev/null || . /usr/lib/patch-scripts/patchfns >/dev/null || { \
10         echo "Impossible to find my library 'patchfns'."
11         echo "Check your install, or go to the right directory"
12         exit 1
13 }
14
15 # tag_one tag patchname
16 #
17 tag_one()
18 {
19         PN=$(stripit $2)
20         if [ -r $P/txt/$PN.txt ]
21         then
22                 cvs tag $1 $P/pc/$PN.pc $P/patches/$PN.patch $P/txt/$PN.txt
23         else
24                 cvs tag $1 $P/pc/$PN.pc $P/patches/$PN.patch
25         fi
26 }
27
28 if [ $# -ne 2 ]
29 then
30         echo Usage: tag-series tagname series-file-name
31         exit 1
32 fi
33
34 TAG=$1
35 SERIES=$2
36
37 for p in $(cat $SERIES)
38 do
39         tag_one $TAG $p
40 done
41 cvs tag $TAG $SERIES