File: recreate-diffs.sh

package info (click to toggle)
sylpheed-gtk1 1.0.6-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,588 kB
  • ctags: 5
  • sloc: makefile: 32; sh: 30
file content (26 lines) | stat: -rw-r--r-- 497 bytes parent folder | download | duplicates (5)
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
#!/bin/bash

PACK=$1

test -d $PACK.patched && rm -r $PACK.patched

cp -r $PACK{,.patched} 

for i in patches/*; do 
    echo "Patching $i..."
    cd $PACK.patched
    cat ../$i | patch -p1
    cd .. 
    for a in orig rej ; do 
	find $PACK.patched -name \*.$a -exec rm -f {} \;
	find $PACK -name \*.$a -exec rm -f {} \;
    done
    diff -urN $PACK $PACK.patched > $i.new
    mv $i $i.old
    mv $i.new $i
    rm -r $PACK
    cp -r $PACK.patched $PACK
done

rm -r $PACK.patched
touch patch-stamp