Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gentoo-headers: rip-headers.sh
Date: Sun, 26 Oct 2008 11:08:06
Message-Id: E1Ku3B3-0005lh-Cj@stork.gentoo.org
1 vapier 08/10/26 10:48:57
2
3 Modified: rip-headers.sh
4 Log:
5 add support for 2.6.27 header split
6
7 Revision Changes Path
8 1.4 src/patchsets/gentoo-headers/rip-headers.sh
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/rip-headers.sh?rev=1.4&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/rip-headers.sh?rev=1.4&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/rip-headers.sh?r1=1.3&r2=1.4
13
14 Index: rip-headers.sh
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/src/patchsets/gentoo-headers/rip-headers.sh,v
17 retrieving revision 1.3
18 retrieving revision 1.4
19 diff -u -r1.3 -r1.4
20 --- rip-headers.sh 20 Apr 2008 03:23:27 -0000 1.3
21 +++ rip-headers.sh 26 Oct 2008 10:48:57 -0000 1.4
22 @@ -2,6 +2,8 @@
23
24 ver=$1
25 [[ -z $ver ]] && exit 1
26 +[[ ${ver} == linux-* ]] && ver=${ver#linux-}
27 +ver=${ver%/}
28
29 src=linux-${ver}
30 dst=gentoo-headers-base-${ver}
31 @@ -16,7 +18,7 @@
32 cp -r \
33 ${src}/scripts/{Makefile,Kbuild}* \
34 ${src}/scripts/unifdef.c \
35 - ${src}/scripts/*.sh \
36 + ${src}/scripts/*.{sh,pl} \
37 ${dst}/scripts/
38 mkdir -p ${dst}/scripts/basic
39 printf '#!/bin/sh\nexit 0' > ${dst}/scripts/basic/fixdep
40 @@ -25,13 +27,18 @@
41 mkdir ${dst}/arch
42 arches=$(cd ${src}/arch ; ls)
43 for a in ${arches} ; do
44 - [[ ! -e ${src}/include/asm-${a}/Kbuild ]] && continue
45 - mkdir -p ${dst}/arch/${a}
46 - cp ${src}/arch/${a}/Makefile* ${dst}/arch/${a}/
47 + if [[ -e ${src}/include/asm-${a}/Kbuild ]] || [[ -e ${src}/arch/${a}/include/asm/Kbuild ]] ; then
48 + mkdir -p ${dst}/arch/${a}
49 + cp ${src}/arch/${a}/Makefile* ${dst}/arch/${a}/
50 + if [[ -e ${src}/arch/${a}/include ]] ; then
51 + cp -r ${src}/arch/${a}/include ${dst}/arch/${a}/
52 + fi
53 + fi
54 done
55
56 cp README.ripped-headers rip-headers.sh ${dst}/
57
58 -tar cf - ${dst} | lzma > ${dst}.tar.lzma
59 +compress=lzma
60 +tar cf - ${dst} | ${compress} > ${dst}.tar.lzma
61 rm -rf ${dst}
62 ls -lh ${dst}.tar.lzma