diff options
Diffstat (limited to '')
-rwxr-xr-x | bin/debian-patches-unapply | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/bin/debian-patches-unapply b/bin/debian-patches-unapply new file mode 100755 index 0000000..fc7f204 --- /dev/null +++ b/bin/debian-patches-unapply @@ -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 | reverse) + do + echo -n "${PATCH}:" + + patch -Np1 -R -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 |