mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
26 lines
827 B
Bash
Executable File
26 lines
827 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright 2006-2007 (C) Kees Cook <kees@ubuntu.com>
|
|
# Modified by Siegfried-A. Gevatter <siggi.gevatter@gmail.com>
|
|
# License: GPLv2
|
|
|
|
if [[ -d debian ]]; then
|
|
cd . # pass
|
|
elif [[ -d ../debian ]]; then
|
|
cd ..
|
|
elif [[ -d ../patches ]]; then
|
|
cd ../..
|
|
else
|
|
echo "Can't find debian/rules."; exit
|
|
fi
|
|
|
|
for filename in $(echo "debian/rules"; grep ^include debian/rules | fgrep -v '$(' | awk '{print $2}')
|
|
do
|
|
fgrep -q patchsys.mk "$filename" && { echo "cdbs"; exit; }
|
|
fgrep -q quilt "$filename" && { echo "quilt"; exit; }
|
|
fgrep -q dbs-build.mk "$filename" && { echo "dbs"; exit; }
|
|
fgrep -q dpatch "$filename" && { echo "dpatch"; exit; }
|
|
fgrep -q '*.diff' "$filename" && { echo "diff splash"; exit; }
|
|
done
|
|
[ -d debian/patches ] || { echo "patchless?"; exit; }
|
|
echo "unknown patch system"
|