mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
in automated tools, so default behavior is best to leave unchanged. * check-symbols: check for binary list very carefully. * dch-repeat: add Hardy to distro list. * mk-sbuild-lv: use -r instead of -f for possible debootstrap symlinks.
55 lines
1.6 KiB
Bash
Executable File
55 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
# Copyright 2006-2007 (C) Kees Cook <kees@ubuntu.com>
|
|
# Modified by Siegfried-A. Gevatter <rainct@ubuntu.com>
|
|
# Modified by Daniel Hahler <ubuntu@thequod.de>
|
|
# License: GPLv2
|
|
|
|
# Default operation reports only the patch system. Verbose mode can be
|
|
# enabled with -v
|
|
if [ "$1" = "-h" ] || [ "$1" = "--help" ]
|
|
then
|
|
cat <<EOM
|
|
Usage: $0 [-v]
|
|
|
|
Run this inside the source directory of a Debian package and it will detect
|
|
the patch system that it uses.
|
|
|
|
-v: Print a list of all those files outside the debian/ directory that have
|
|
been modified (if any).
|
|
EOM
|
|
exit 0
|
|
fi
|
|
|
|
while [ ! -r debian/rules ];
|
|
do
|
|
if [ "$PWD" = "/" ]; then
|
|
echo "Can't find debian/rules."
|
|
exit 1
|
|
fi
|
|
cd ..
|
|
done
|
|
|
|
if [ "$1" = "-v" ]
|
|
then
|
|
files=`lsdiff -z ../$(dpkg-parsechangelog | grep ^Source: | sed -e "s/^Source: //")_$(dpkg-parsechangelog | grep ^Version: | sed -e "s/^Version: //").diff.gz 2>/dev/null | grep -v 'debian/'`
|
|
if [ -n "$files" ]
|
|
then
|
|
echo "Following files were modified outside of the debian/ directory:"
|
|
echo "$files"
|
|
echo "--------------------"
|
|
echo
|
|
echo -n "Patch System: "
|
|
fi
|
|
fi
|
|
|
|
for filename in $(echo "debian/rules"; grep ^include debian/rules | fgrep -v '$(' | awk '{print $2}')
|
|
do
|
|
fgrep patchsys.mk "$filename" | grep -q -v "^#" && { echo "cdbs"; exit 0; }
|
|
fgrep quilt "$filename" | grep -q -v "^#" && { echo "quilt"; exit 0; }
|
|
fgrep dbs-build.mk "$filename" | grep -q -v "^#" && { echo "dbs"; exit 0; }
|
|
fgrep dpatch "$filename" | grep -q -v "^#" && { echo "dpatch"; exit 0; }
|
|
fgrep '*.diff' "$filename" | grep -q -v "^#" && { echo "diff splash"; exit 0; }
|
|
done
|
|
[ -d debian/patches ] || { echo "patchless?"; exit 0; }
|
|
echo "unknown patch system"
|