summaryrefslogtreecommitdiffstats
path: root/needs-checking/join-patch
diff options
context:
space:
mode:
Diffstat (limited to 'needs-checking/join-patch')
-rwxr-xr-xneeds-checking/join-patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/needs-checking/join-patch b/needs-checking/join-patch
new file mode 100755
index 0000000..493d434
--- /dev/null
+++ b/needs-checking/join-patch
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+usage()
+{
+ echo "Usage: join-patch patchname"
+ exit 1
+}
+
+if [ $# -ne 1 ]
+then
+ usage
+fi
+
+PATCHNAME=$(stripit $1)
+
+if ! can_apply $PATCHNAME
+then
+ echo Patch $PATCHNAME does not apply
+ exit 1
+fi
+
+pcpatch $PATCHNAME
+for i in $(files_in_patch $PATCHNAME)
+do
+ fpatch $i
+done
+
+patch -p1 -i $(patch_file_name $PATCHNAME) -f