Whamcloud - gitweb
- make HEAD from b_post_cmd3
[fs/lustre-release.git] / lustre / kernel_patches / scripts / refpatch
diff --git a/lustre/kernel_patches/scripts/refpatch b/lustre/kernel_patches/scripts/refpatch
new file mode 100755 (executable)
index 0000000..3195a57
--- /dev/null
@@ -0,0 +1,32 @@
+#!/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
+}
+
+usage()
+{
+       echo "Usage: refpatch"
+       exit 1
+}
+
+doit()
+{
+       echo $* 1>&2
+       $* || {
+               echo oops
+               exit 1 
+       }
+}
+
+if [ $# != 0 ]
+then
+       usage
+fi
+
+TOP_PATCH=$(top_patch)
+mpatch $* $(top_patch)
+sum-series applied-patch
+echo "Refreshed $TOP_PATCH"