summaryrefslogtreecommitdiffstats
path: root/bin/debian-patches-test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-09 04:21:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-09 04:21:55 +0000
commit453cc058d9ee6d7cb47529d99061216e72149a5f (patch)
tree38e3683d9cb52c2f181d65ba513554a5e1387f20 /bin/debian-patches-test
parentInitial commit. (diff)
downloadprogress-linux-tools-453cc058d9ee6d7cb47529d99061216e72149a5f.tar.xz
progress-linux-tools-453cc058d9ee6d7cb47529d99061216e72149a5f.zip
Adding bin.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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