File: patch.apply

package info (click to toggle)
apache 1.3.34-4.1%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 4,824 kB
  • ctags: 90
  • sloc: sh: 1,273; makefile: 686; perl: 215
file content (21 lines) | stat: -rw-r--r-- 491 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
. debian/scripts/vars
. debian/scripts/lib
mkdir -p $STAMP_DIR/patches $SOURCE_DIR/$TAR_DIR
for f in `find debian/patches -maxdepth 1 -type f|sort`;do
	bf=$(basename $f)
	stampfile=$STAMP_DIR/patches/$bf
	if [ ! -e $stampfile ];then
		[ -r debian/patches/.$bf ] && sh debian/patches/.$bf && continue
		START $bf
		if file2cat $f | (cd $SOURCE_DIR/$TAR_DIR;patch -p1) > $stampfile.log;then
			OK
			touch $stampfile
		else
			FAILED
			exit 1
		fi
	else
		ALREADY_DONE $bf
	fi
done