summaryrefslogtreecommitdiffstats
path: root/bin/debian-patches-test
diff options
context:
space:
mode:
Diffstat (limited to 'bin/debian-patches-test')
-rwxr-xr-xbin/debian-patches-test28
1 files changed, 28 insertions, 0 deletions
diff --git a/bin/debian-patches-test b/bin/debian-patches-test
new file mode 100755
index 0000000..18aea57
--- /dev/null
+++ b/bin/debian-patches-test
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+if [ -e patches/series ] && [ "$(basename ${PWD})" = "debian" ]
+then
+ cd ..
+fi
+
+if [ -e debian/patches/series ]
+then
+ for PATCH in $(grep -v '^#' debian/patches/series)
+ do
+ echo -n "${PATCH}:"
+
+ patch -Np1 -s -i "debian/patches/${PATCH}" --dry-run > /dev/null 2>&1
+
+ case "${?}" in
+ 0)
+ echo " Ok"
+ ;;
+
+ *)
+ echo " Failed"
+ ;;
+ esac
+ done
+else
+ echo "package does not have patches"
+fi