Whamcloud - gitweb
- merge 0.7rc1 from b_devel to HEAD (20030612 merge point)
[fs/lustre-release.git] / lustre / kernel_patches / scripts / join-patch
diff --git a/lustre/kernel_patches/scripts/join-patch b/lustre/kernel_patches/scripts/join-patch
new file mode 100755 (executable)
index 0000000..065ea73
--- /dev/null
@@ -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 $(cat $P/pc/$PATCHNAME.pc)
+do
+       fpatch $i
+done
+
+patch -p1 -i "$P/patches/$PATCHNAME.patch" -f