Autocommit of all changes since last autosync startup on host ares
authorJulien Valroff <julien@kirya.net>
Sat, 5 Nov 2011 06:21:50 +0000 (07:21 +0100)
committerJulien Valroff <julien@kirya.net>
Sat, 5 Nov 2011 06:21:50 +0000 (07:21 +0100)
autosync-xdg-launcher.sh [new file with mode: 0755]

diff --git a/autosync-xdg-launcher.sh b/autosync-xdg-launcher.sh
new file mode 100755 (executable)
index 0000000..ecd88e7
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+# This simple script will start autosync.py daemons for all configs found in $XDG_CONF_HOME/autosync/,
+# stopping any existing daemons with that config first.
+conf=${XDG_CONF_HOME:-$HOME/.config}/autosync
+data=${XDG_DATA_HOME:-$HOME/.local/share}/autosync
+mkdir -p $data/log
+for i in $conf/*.conf
+do
+    pkill -f "python.*dvcs-autosync .*autosync/$(basename $i)"
+    dvcs-autosync $i &> $data/log/$(basename $i).$(date '+%F-%T').log &
+done