]> git.ipfire.org Git - people/ms/strongswan.git/blob - packaging/utils/kernel.patch.gen.sh
- import of strongswan-2.7.0
[people/ms/strongswan.git] / packaging / utils / kernel.patch.gen.sh
1 #!/bin/bash
2 #
3 # RCSID $Id: kernel.patch.gen.sh,v 1.1 2004/03/15 20:35:27 as Exp $
4
5 patchdir=`pwd`
6 kernelsrc=/usr/src/linux
7 [ "$1~" = "~" ] || kernelsrc=$1
8 cd $kernelsrc
9 # clean out destination file for all patch
10 #echo "">$patchdir/all
11
12 # find files to patch and loop
13 for i in `find . -name '*.preipsec'`
14 do
15
16 # strip off '.preipsec' suffix
17 j=${i%.preipsec}
18
19 # strip off './' prefix
20 k=${j#\.\/}
21
22 # single unified diff
23 #diff -u $i $j >>$patchdir/all
24
25 # convert '/' in filename to '.' to avoid subdirectories
26 sed -e 's/\//\./g' << EOI > /tmp/t
27 $k
28 EOI
29 l=`cat /tmp/t`
30 rm -f /tmp/t
31
32 # *with* path from source root
33 #echo do diff -u $i $j '>' $patchdir/$l
34 echo found $i
35 echo "RCSID \$Id: kernel.patch.gen.sh,v 1.1 2004/03/15 20:35:27 as Exp $" >$patchdir/$l
36 diff -u $i $j >>$patchdir/$l
37
38 done
39
40 #
41 # $Log: kernel.patch.gen.sh,v $
42 # Revision 1.1 2004/03/15 20:35:27 as
43 # added files from freeswan-2.04-x509-1.5.3
44 #
45 # Revision 1.6 2002/04/25 17:04:16 mcr
46 # resurrected kernel.patch.gen.sh
47 #
48 # Revision 1.4 1999/04/06 04:54:30 rgb
49 # Fix/Add RCSID Id: and Log: bits to make PHMDs happy. This includes
50 # patch shell fixes.
51 #
52 #