Whamcloud - gitweb
- bring in akpm's patch management scripts and a first cut at
[fs/lustre-release.git] / lustre / kernel_patches / scripts / removed-by-patch
diff --git a/lustre/kernel_patches/scripts/removed-by-patch b/lustre/kernel_patches/scripts/removed-by-patch
new file mode 100755 (executable)
index 0000000..ff12970
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Extract names of new files from a patch, print them out
+
+PATCHFILE=$1
+case "$PATCHFILE" in
+*.gz) CMD="gzip -d < $PATCHFILE";;
+*)    CMD="cat $PATCHFILE";;
+esac
+
+TMP=$(mktemp /tmp/rbp-XXXXXX)
+
+eval $CMD | egrep '^\+\+\+.*1970|\+\+\+.*1969' > $TMP
+sed -e 's@[^/]*/\([^   ]*\).*@\1@' < $TMP | sed -e 's@^linux/@@' | sort
+rm -f $TMP