summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2007-11-05 19:00:58 -0500
committerJoey Hess <joey@kodama.kitenet.net>2007-11-05 19:00:58 -0500
commit0e5e742b5072eb86c8e722c29dd75ccbb976daa7 (patch)
tree522a8773963fc5b38fa2806efc23334ada10fdd4
parent5c2fee1ae50780b7aaa8bb79f4c9b885ecc72ccc (diff)
add script to handle git-rm of files
-rwxr-xr-xpost-apt.d/60git-rm10
1 files changed, 10 insertions, 0 deletions
diff --git a/post-apt.d/60git-rm b/post-apt.d/60git-rm
new file mode 100755
index 0000000..73dc4d8
--- /dev/null
+++ b/post-apt.d/60git-rm
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+TAB=" "
+
+for file in $(git status | egrep "^#${TAB}*deleted: *" | sed 's/.*deleted: *//'); do
+ if [ ! -d "$file" ]; then
+ git rm "$file"
+ fi
+done