File: patch.apply

package info (click to toggle)
openldap-guide 19991007-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 128 kB
  • ctags: 13
  • sloc: makefile: 127; sh: 114; perl: 63
file content (24 lines) | stat: -rw-r--r-- 512 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
. debian/scripts/vars
. debian/scripts/lib
mkdir -p $STAMP_DIR/patches $SOURCE_DIR/$TAR_DIR

for d in $PATCH_DIR $ADD_PATCH_DIR;do
	mkdir -p $STAMP_DIR/log/$d
	for f in `(cd $d;find -type f ! -name 'chk-*')|sort`;do
		stampfile=$STAMP_DIR/patches/$f
		log=$STAMP_DIR/log/$d/$f
		if [ ! -e $stampfile ];then
			START $d/$f
			if file2cat $d/$f | (cd $SOURCE_DIR/$TAR_DIR;patch -p1) > $log;then
				OK
				touch $stampfile
			else
				FAILED
				exit 1
			fi
		else
			ALREADY_DONE $d/$f
		fi
	done
done