Whamcloud - gitweb
- bring in akpm's patch management scripts and a first cut at
[fs/lustre-release.git] / lustre / kernel_patches / scripts / prep-patch
diff --git a/lustre/kernel_patches/scripts/prep-patch b/lustre/kernel_patches/scripts/prep-patch
new file mode 100755 (executable)
index 0000000..1d60ea9
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+. patchfns >/dev/null || . /usr/lib/patch-scripts/patchfns >/dev/null || { \
+       echo "Impossible to find my library 'patchfns'."
+       echo "Check your install, or go to the right directory"
+       exit 1
+}
+
+if [ $# -ne 1 ]
+then
+       echo "Usage prep-patch patchname"
+       exit 1
+fi
+
+PATCHNAME=$(stripit $1)
+
+xcb -s 2 < $P/patches/$PATCHNAME.patch
+head -2 $P/txt/$PATCHNAME.txt | tail -1 | tr -d '\n' | xcb -s 1