convert from svn repository: remove tags directory
[lttv.git] / trunk / scripts / lttng-core-split-script.sh
CommitLineData
8a0815ff 1#!/bin/sh
e24cd4a7 2# LTTng patch creation core
8a0815ff 3# Creates a -all patch, and split it.
4# Mathieu Desnoyers, october 2005
5#$1 is the version
6
7function wr () {
8
9 cat $1 >> $2
10
11}
12
13
2d5f02cf 14PRENAME=patch
a2c3167e 15NAME=-2.6.19-lttng-core-$1
2d5f02cf 16ALL_NAME=${PRENAME}${NAME}-all.diff
17VALUE=1
18printf -v COUNT "%02d" ${VALUE}
8a0815ff 19
20rm -fr tmppatch
21mkdir tmppatch
8a0815ff 22
23cd tmppatch
24
25cp ../$ALL_NAME .
26
27splitdiff -a -d $ALL_NAME
28
1a6c4b55 29rm $ALL_NAME
30
31for a in *; do
32 cp $a $a.tmp;
33 grep -v -e "^diff --git " -e "^new file mode " -e "^index " $a.tmp > $a
34 rm $a.tmp;
35done
36
2d5f02cf 37FILE=../${PRENAME}${COUNT}${NAME}-debugfs.diff
38VALUE=$(( ${VALUE} + 1 ))
39printf -v COUNT "%02d" ${VALUE}
11df8cd5 40
41IN="?_fs_debugfs_inode.c"
42
43for a in $IN; do wr $a $FILE; done
44
2d5f02cf 45#for hotplug
46FILE=../${PRENAME}${COUNT}${NAME}-relay.diff
47VALUE=$(( ${VALUE} + 1 ))
48printf -v COUNT "%02d" ${VALUE}
11df8cd5 49
2d5f02cf 50IN="?_include_linux_relay.h
51?_kernel_relay.c
52?_block_blktrace.c"
11df8cd5 53
2d5f02cf 54for a in $IN; do wr $a $FILE; done
8a0815ff 55
2d5f02cf 56FILE=../${PRENAME}${COUNT}${NAME}-markers.diff
57VALUE=$(( ${VALUE} + 1 ))
58printf -v COUNT "%02d" ${VALUE}
59
60IN="?_include_asm-generic_vmlinux.lds.h
61?_kernel_Kconfig.marker
62?_include_linux_module.h
63?_include_linux_marker.h
64?_include_asm-arm_marker.h
65?_include_asm-cris_marker.h
66?_include_asm-frv_marker.h
67?_include_asm-generic_marker.h
68?_include_asm-h8300_marker.h
69?_include_asm-i386_marker.h
70?_include_asm-ia64_marker.h
71?_include_asm-m32r_marker.h
72?_include_asm-m68k_marker.h
73?_include_asm-m68knommu_marker.h
74?_include_asm-mips_marker.h
75?_include_asm-parisc_marker.h
76?_include_asm-powerpc_marker.h
77?_include_asm-ppc64_marker.h
78?_include_asm-ppc_marker.h
79?_include_asm-s390_marker.h
80?_include_asm-sh64_marker.h
81?_include_asm-sh_marker.h
82?_include_asm-sparc64_marker.h
83?_include_asm-sparc_marker.h
84?_include_asm-um_marker.h
85?_include_asm-v850_marker.h
86?_include_asm-x86_64_marker.h
45af55e9 87?_include_asm-xtensa_marker.h
88?_kernel_module.c"
8a0815ff 89
90for a in $IN; do wr $a $FILE; done
91
2d5f02cf 92FILE=../${PRENAME}${COUNT}${NAME}-atomic_up.diff
93VALUE=$(( ${VALUE} + 1 ))
94printf -v COUNT "%02d" ${VALUE}
8a0815ff 95
2d5f02cf 96IN="?_include_asm-i386_atomic-up.h
97?_include_asm-i386_system.h
98?_include_asm-x86_64_atomic-up.h
99?_include_asm-x86_64_system.h
100?_include_asm-powerpc_atomic-up.h
101?_include_asm-powerpc_system.h
102?_include_asm-arm_atomic-up.h
103?_include_asm-mips_atomic-up.h
104?_include_asm-generic_atomic-up.h"
8a0815ff 105
2d5f02cf 106for a in $IN; do wr $a $FILE; done
107
0452be20 108FILE=../${PRENAME}${COUNT}${NAME}-facilities.diff
109VALUE=$(( ${VALUE} + 1 ))
110printf -v COUNT "%02d" ${VALUE}
111
112IN="?_include_linux_ltt-facilities.h
113?_ltt_ltt-facilities.c"
114
115for a in $IN; do wr $a $FILE; done
116
117
2d5f02cf 118FILE=../${PRENAME}${COUNT}${NAME}-facility-core-headers.diff
119VALUE=$(( ${VALUE} + 1 ))
120printf -v COUNT "%02d" ${VALUE}
121
122IN="?_include_ltt_ltt-facility-core.h
9f438fac 123?_include_ltt_ltt-facility-id-core.h
124?_include_ltt_ltt-facility-select-core.h"
8a0815ff 125
8a0815ff 126for a in $IN; do wr $a $FILE; done
127
8a0815ff 128
2d5f02cf 129FILE=../${PRENAME}${COUNT}${NAME}-facility-loader-core.diff
130VALUE=$(( ${VALUE} + 1 ))
131printf -v COUNT "%02d" ${VALUE}
132
133IN="?_ltt_facilities_ltt-facility-loader-core.c
134?_ltt_facilities_ltt-facility-loader-core.h
135?_ltt_facilities_Makefile"
8a0815ff 136
137for a in $IN; do wr $a $FILE; done
138
8a0815ff 139
2d5f02cf 140FILE=../${PRENAME}${COUNT}${NAME}-timestamp.diff
141VALUE=$(( ${VALUE} + 1 ))
142printf -v COUNT "%02d" ${VALUE}
8a0815ff 143
1a6c4b55 144IN="?_include_asm-alpha_ltt.h
8a0815ff 145?_include_asm-arm26_ltt.h
146?_include_asm-arm_ltt.h
147?_include_asm-cris_ltt.h
148?_include_asm-frv_ltt.h
149?_include_asm-generic_ltt.h
150?_include_asm-h8300_ltt.h
151?_include_asm-i386_ltt.h
152?_include_asm-ia64_ltt.h
153?_include_asm-m32r_ltt.h
154?_include_asm-m68k_ltt.h
155?_include_asm-m68knommu_ltt.h
156?_include_asm-mips_ltt.h
157?_include_asm-mips_mipsregs.h
158?_include_asm-mips_timex.h
159?_arch_mips_kernel_time.c
160?_include_asm-parisc_ltt.h
161?_include_asm-powerpc_ltt.h
162?_include_asm-ppc_ltt.h
163?_include_asm-s390_ltt.h
164?_include_asm-sh64_ltt.h
165?_include_asm-sh_ltt.h
166?_include_asm-sparc64_ltt.h
167?_include_asm-sparc_ltt.h
168?_include_asm-um_ltt.h
169?_include_asm-v850_ltt.h
2d5f02cf 170?_include_asm-x86_64_ltt.h
171?_include_asm-xtensa_ltt.h"
1a6c4b55 172
173for a in $IN; do wr $a $FILE; done
174
175
2d5f02cf 176FILE=../${PRENAME}${COUNT}${NAME}-core-header.diff
177VALUE=$(( ${VALUE} + 1 ))
178printf -v COUNT "%02d" ${VALUE}
1a6c4b55 179
180IN="?_include_linux_ltt-core.h"
181
182for a in $IN; do wr $a $FILE; done
183
184
2d5f02cf 185FILE=../${PRENAME}${COUNT}${NAME}-core.diff
186VALUE=$(( ${VALUE} + 1 ))
187printf -v COUNT "%02d" ${VALUE}
1a6c4b55 188
189IN="?_MAINTAINERS
8a0815ff 190?_ltt_ltt-core.c
2d5f02cf 191?_ltt_ltt-heartbeat.c"
1a6c4b55 192
193for a in $IN; do wr $a $FILE; done
194
2d5f02cf 195FILE=../${PRENAME}${COUNT}${NAME}-tracer-header.diff
196VALUE=$(( ${VALUE} + 1 ))
197printf -v COUNT "%02d" ${VALUE}
198
199IN="?_include_ltt_ltt-tracer.h"
1a6c4b55 200
2d5f02cf 201for a in $IN; do wr $a $FILE; done
1a6c4b55 202
2d5f02cf 203
204FILE=../${PRENAME}${COUNT}${NAME}-tracer.diff
205VALUE=$(( ${VALUE} + 1 ))
206printf -v COUNT "%02d" ${VALUE}
207
208IN="?_ltt_ltt-tracer.c"
209
210for a in $IN; do wr $a $FILE; done
211
212
213
214FILE=../${PRENAME}${COUNT}${NAME}-transport.diff
215VALUE=$(( ${VALUE} + 1 ))
216printf -v COUNT "%02d" ${VALUE}
1a6c4b55 217
11df8cd5 218IN="?_ltt_ltt-relay.c
219?_Documentation_ioctl-number.txt"
220
221for a in $IN; do wr $a $FILE; done
222
223
224
2d5f02cf 225FILE=../${PRENAME}${COUNT}${NAME}-netlink-control.diff
226VALUE=$(( ${VALUE} + 1 ))
227printf -v COUNT "%02d" ${VALUE}
11df8cd5 228
229IN="?_ltt_ltt-control.c
230?_ltt_ltt-control.h
231?_include_linux_netlink.h"
232
233for a in $IN; do wr $a $FILE; done
234
235
2d5f02cf 236FILE=../${PRENAME}${COUNT}${NAME}-userspace-tracing.diff
237VALUE=$(( ${VALUE} + 1 ))
238printf -v COUNT "%02d" ${VALUE}
11df8cd5 239
240IN="?_include_linux_sched.h
241?_kernel_sys_ni.c
2d5f02cf 242?_ltt_ltt-syscall.c
11df8cd5 243?_kernel_exit.c
244?_kernel_fork.c
2d5f02cf 245?_include_asm-arm_unistd.h
11df8cd5 246?_include_asm-i386_unistd.h
2d5f02cf 247?_include_asm-mips_unistd.h
11df8cd5 248?_include_asm-powerpc_unistd.h
2d5f02cf 249?_include_asm-powerpc_systbl.h
11df8cd5 250?_include_asm-x86_64_unistd.h"
1a6c4b55 251
252for a in $IN; do wr $a $FILE; done
253
2d5f02cf 254FILE=../${PRENAME}${COUNT}${NAME}-build.diff
255VALUE=$(( ${VALUE} + 1 ))
256printf -v COUNT "%02d" ${VALUE}
1a6c4b55 257
258IN="?_Makefile
1a6c4b55 259?_ltt_Kconfig
260?_ltt_Makefile
2d5f02cf 261?_arch_alpha_Kconfig
262?_arch_cris_Kconfig
263?_arch_frv_Kconfig
264?_arch_h8300_Kconfig
8a0815ff 265?_arch_i386_Kconfig
2d5f02cf 266?_arch_ia64_Kconfig
267?_arch_m32r_Kconfig
268?_arch_m68k_Kconfig
269?_arch_m68knommu_Kconfig
8a0815ff 270?_arch_ppc_Kconfig
271?_arch_powerpc_Kconfig
2d5f02cf 272?_arch_parisc_Kconfig
8a0815ff 273?_arch_arm_Kconfig
2d5f02cf 274?_arch_arm26_Kconfig
8a0815ff 275?_arch_mips_Kconfig
2d5f02cf 276?_arch_s390_Kconfig
277?_arch_sh64_Kconfig
278?_arch_sh_Kconfig
279?_arch_sparc64_Kconfig
280?_arch_sparc_Kconfig
281?_arch_um_Kconfig
282?_arch_v850_Kconfig
283?_arch_xtensa_Kconfig
1a6c4b55 284?_arch_x86_64_Kconfig"
8a0815ff 285
286for a in $IN; do wr $a $FILE; done
287
1a6c4b55 288
289
8a0815ff 290cd ..
291
292rm $ALL_NAME
2d5f02cf 293tar cvfj ${PRENAME}${NAME}.tar.bz2 ${PRENAME}*${NAME}-*
8a0815ff 294
This page took 0.043209 seconds and 4 git commands to generate.