From: Julien Valroff Date: Sat, 5 Nov 2011 06:21:50 +0000 (+0100) Subject: Autocommit of all changes since last autosync startup on host ares X-Git-Url: https://git.kirya.net/?p=dotfiles%2Fscripts.git;a=commitdiff_plain;h=f9595c51e94915cf381197d07dfd07712a69b1ee Autocommit of all changes since last autosync startup on host ares --- diff --git a/autosync-xdg-launcher.sh b/autosync-xdg-launcher.sh new file mode 100755 index 0000000..ecd88e7 --- /dev/null +++ b/autosync-xdg-launcher.sh @@ -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