commit 88906145be8ea0bca6f0fcb2b58818883e759746 parent d23c7d2bfdd33eeb01181e70dc2e41e961a91e13 Author: Antoine Amarilli <a3nm@a3nm.net> Date: Mon, 2 Jan 2017 14:15:19 +0100 svn-poll-myrepos Diffstat:
svn-poll-myrepos | | | 22 | ++++++++++++++++++++++ |
1 file changed, 22 insertions(+), 0 deletions(-)
diff --git a/svn-poll-myrepos b/svn-poll-myrepos @@ -0,0 +1,22 @@ +#!/bin/bash + +# mail about changes to all repos registered in myrepos configuration + +LOCKDIR="$HOME/temp/lock" +mkdir -p "$LOCKDIR" + +CONFIG="$HOME/.mrconfig" +LOCK="$LOCKDIR/svn-poll-myrepos" +USERS="$HOME/config/private/svnrepos" + +lockfile -r 0 "$LOCK" || { echo "could not acquire lock"; exit 1; } + +cd +grep '^\[svn/' "$CONFIG" | tr -d '[]' | while read REPO; do + URL=$(svn info "$REPO" | grep '^URL' | cut -d':' -f2- | tr -d ' ') + USER=$(grep "^$URL" "$USERS" | cut -d' ' -f2) + $HOME/bin/svn-poll "$URL" "$USER" +done + +rm -f "$LOCK" +