summaryrefslogtreecommitdiffstats
path: root/bin/debian-patches-apply
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbin/debian-patches-apply28
1 files changed, 28 insertions, 0 deletions
diff --git a/bin/debian-patches-apply b/bin/debian-patches-apply
new file mode 100755
index 0000000..a1920eb
--- /dev/null
+++ b/bin/debian-patches-apply
@@ -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}" > /dev/null 2>&1
+
+ case "${?}" in
+ 0)
+ echo " Ok"
+ ;;
+
+ *)
+ echo " Failed"
+ ;;
+ esac
+ done
+else
+ echo "package does not have patches"
+fi