|
4
by Fabien Tassin
* Add dquilt, a Debian quilt helper for package maintainers |
1 |
#!/bin/sh
|
2 |
||
3 |
# dquilt: a Debian quilt helper for package maintainers
|
|
4 |
# (c) 2008, Fabien Tassin <fta@sofaraway.org>
|
|
5 |
||
6 |
# This program is free software; you can redistribute it and/or
|
|
7 |
# modify it under the terms of the GNU General Public License as
|
|
8 |
# published by the Free Software Foundation; either version 2, or (at
|
|
9 |
# your option) any later version.
|
|
10 |
#
|
|
11 |
# This program is distributed in the hope that it will be useful, but
|
|
12 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14 |
# General Public License for more details.
|
|
15 |
#
|
|
16 |
# You should have received a copy of the GNU General Public License along
|
|
17 |
# with this program; if not, write to the Free Software Foundation, Inc.,
|
|
18 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
19 |
||
20 |
########################################################################
|
|
21 |
||
22 |
# Newer quilt helper script no longer installs a symlink to
|
|
23 |
# debian/patches, but relies on QUILT_PATCHES instead. This is
|
|
24 |
# fine for the builder but not for maintainers.
|
|
25 |
# This script scans from current directory down to "/" looking for
|
|
26 |
# a debian/patches directory, then it calls quilt with the proper
|
|
27 |
# QUILT_PATCHES set
|
|
28 |
||
29 |
QUILT=/usr/bin/quilt |
|
30 |
DEBIAN_PATCHES=debian/patches |
|
31 |
||
32 |
DIR=`pwd` |
|
33 |
while [ 1 ] ; do |
|
34 |
if [ -d "$DIR/$DEBIAN_PATCHES" ] ; then |
|
35 |
QUILT_PATCHES="$DIR/$DEBIAN_PATCHES" $QUILT $@ |
|
36 |
exit $? |
|
37 |
fi
|
|
38 |
DIR=`dirname "$DIR"` |
|
39 |
if [ "$DIR" = "/" ] ; then |
|
40 |
echo "Error: no $DEBIAN_PATCHES dir found" |
|
41 |
exit 1
|
|
42 |
fi
|
|
43 |
done
|