File: patch.apply

package info (click to toggle)
apache2 2.0.54-5sarge2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,260 kB
  • ctags: 176
  • sloc: sh: 533; makefile: 367; python: 209; perl: 127
file content (21 lines) | stat: -rw-r--r-- 493 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
. debian/scripts/vars
. debian/scripts/lib
mkdir -p $STAMP_DIR/patches $SOURCE_DIR/$TAR_DIR
for f in `find debian/patches -type f -maxdepth 1|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