summaryrefslogtreecommitdiffstats
path: root/git-rm-for-kernel.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-rm-for-kernel.sh')
-rwxr-xr-xgit-rm-for-kernel.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/git-rm-for-kernel.sh b/git-rm-for-kernel.sh
new file mode 100755
index 0000000..395692d
--- /dev/null
+++ b/git-rm-for-kernel.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+if [ -z "$RM" ]; then
+ export RM='git rm -rf'
+fi
+
+nuke () {
+ find "$@" -print | sort -r | xargs -rt $RM
+}
+
+nuke README Kbuild Makefile defconfig klibc.spec.in *.sh
+nuke contrib klcc
+
+# These files are either not needed or provided from the
+# kernel tree
+nuke scripts/Kbuild.include scripts/Kbuild.install
+nuke scripts/Makefile.*
+nuke scripts/basic