|
Roland McGrath |
11487c5 |
#! /bin/sh
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
# combine a set of quilt patches
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
# $1 : base dir (source tree)
|
|
Roland McGrath |
11487c5 |
# $2 : quilt dir (patches to apply)
|
|
Roland McGrath |
11487c5 |
# $3 : pre-patch to apply first (optional)
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
# e.g.:
|
|
Roland McGrath |
11487c5 |
# combine.sh /home/user/fedora/trunk/kernel/F-11/kernel-2.6.30/vanilla-2.6.30 \
|
|
Roland McGrath |
11487c5 |
# /home/user/git/stable-queue/queue-2.6.30 \
|
|
Roland McGrath |
11487c5 |
# /home/user/fedora/trunk/kernel/F-11/patch-2.6.30.5.bz2
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
if [ $# -lt 2 ] ; then
|
|
Roland McGrath |
11487c5 |
exit 1
|
|
Roland McGrath |
11487c5 |
fi
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
TD="combine_temp.d"
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
cd $1 || exit 1
|
|
Roland McGrath |
11487c5 |
cd ..
|
|
Roland McGrath |
11487c5 |
[ -d $TD ] && rm -Rf $TD
|
|
Roland McGrath |
11487c5 |
mkdir $TD || exit 1
|
|
Roland McGrath |
11487c5 |
cd $TD
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
cp -al ../$(basename $1) work.d
|
|
Roland McGrath |
11487c5 |
cd work.d
|
|
Roland McGrath |
11487c5 |
[ "$3" ] && bzcat $3 | patch -p1 -s
|
|
Roland McGrath |
11487c5 |
ln -s $2 patches
|
|
Roland McGrath |
11487c5 |
[ -h patches ] || exit 1
|
|
Roland McGrath |
11487c5 |
quilt snapshot
|
|
Roland McGrath |
11487c5 |
quilt upgrade
|
|
Roland McGrath |
11487c5 |
quilt push -a -q
|
|
Roland McGrath |
11487c5 |
quilt diff --snapshot >../combined.patch
|