Add wrapper to help registering repositories with mr
authorJulien Valroff <julien@kirya.net>
Sun, 5 Jun 2011 11:15:01 +0000 (13:15 +0200)
committerJulien Valroff <julien@kirya.net>
Sun, 5 Jun 2011 11:15:01 +0000 (13:15 +0200)
mr-register [new file with mode: 0755]

diff --git a/mr-register b/mr-register
new file mode 100755 (executable)
index 0000000..8fe46ea
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Registers all directories under version control in the current directory with mr
+
+
+for i in $(find . -maxdepth 1 -mindepth 1 -type d | sort); do
+    if [ -d $i/.bzr ] || [ -d $i/.git ] || [ -d $i/.cvs ] || [ -d $i/.hg ]; then
+        mr "$@" register $i
+    else
+        echo "Skipping $i"
+    fi
+done