File: daily-patch

package info (click to toggle)
kannel 1.4.5-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,284 kB
  • sloc: ansic: 105,659; sh: 32,211; xml: 20,360; php: 1,103; perl: 711; makefile: 583; yacc: 548; awk: 133; python: 122; javascript: 27; pascal: 3
file content (48 lines) | stat: -rwxr-xr-x 1,085 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
#
# daily-patch - generate and e-mail the daily patch for Kannel
#
# DO NOT RUN THIS SCRIPT, unless you know the recipient and the CVS maintainer
# want you to.
#
# Make a "daily patch", or actually just a patch from the previous time
# this script was run.
#
# Lars Wirzenius <liw@wapit.com>
#

set -e

addr=""
CVSROOT=":pserver:anonymoua@cvs.kannel.org:/home/cvs"

tagsuffix="debug"
newtag="new_daily_patch_tag$tagsuffix"
tag="daily_patch_tag$tagsuffix"

temp=/tmp/daily-patch.$$

for module in "$@"
do
	cvs -Q -d$CVSROOT rtag -F -a -D now $newtag $module
	rm -f $temp
	cvs -Q -d$CVSROOT rdiff -s -r $tag -r $newtag -u $module >> $temp
	if [ -s "$temp" ]
	then
		echo "" >> $temp
		echo "" >> $temp
		echo "" >> $temp
		cvs -Q -d$CVSROOT rdiff -r $tag -r $newtag -u $module |
		awk '/^Index: / {
			if ($2 == "gateway/configure") hide = 1
			else hide = 0
		}
		!hide { print $0 }' >> $temp
		cat $temp
	else
		echo "No changes in $module since yesterday."
	fi | mail -s "Daily patch: $module" $addr
	rm -f $temp

	cvs -Q -d$CVSROOT rtag -F -a -r $newtag $tag $module
done