aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-02-27 11:50:29 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-02-27 11:50:29 -0300
commita825a4ab6b572e25e03231598dd9723d8753a932 (patch)
treeb684d6c36ade48705b15a3e654228751da94d843
parent6426de0a79aa38d6f4f9a2aa71afb212b7395356 (diff)
downloadutils-git-a825a4ab6b572e25e03231598dd9723d8753a932.tar.gz
utils-git-a825a4ab6b572e25e03231598dd9723d8753a932.tar.bz2
New mrconfig-updater
-rwxr-xr-xmrconfig-updater32
1 files changed, 32 insertions, 0 deletions
diff --git a/mrconfig-updater b/mrconfig-updater
new file mode 100755
index 0000000..c758aaa
--- /dev/null
+++ b/mrconfig-updater
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# Generates a `~/.custom/mrconfig-automatic` file with
+# autodetected repositories from some folders.
+#
+# To use this file, just add the following on your ~/.mrtrust:
+#
+# custom/mrconfig-automatic
+#
+# and the following on your ~/.mrconfig:
+#
+# include = cat ~/.custom/mrconfig-automatic
+#
+
+# Configuration
+MRCONFIG="$HOME/.custom/mrconfig-automatic"
+FOLDERS="apps file code"
+CWD="`pwd`"
+
+# Setup
+cd $HOME
+rm -f $MRCONFIG
+
+# Iterate
+for folder in $FOLDERS; do
+ find $folder -name '.git' | while read repo; do
+ echo "[`dirname $repo`]" >> $MRCONFIG
+ done
+done
+
+# Teardown
+cd $CWD