From 45ed11f638444386d413266149edec03fef3814e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Mon, 10 Dec 2012 19:40:33 -0300 Subject: Work with mirrors --- git-shell-commands/fetch-mirrors | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 git-shell-commands/fetch-mirrors (limited to 'git-shell-commands/fetch-mirrors') diff --git a/git-shell-commands/fetch-mirrors b/git-shell-commands/fetch-mirrors new file mode 100755 index 0000000..62ed9f1 --- /dev/null +++ b/git-shell-commands/fetch-mirrors @@ -0,0 +1,20 @@ +#!/bin/sh +# * fetch-mirrors +# Updates mirrors created with `mirror` +# ssh git@host fetch-mirrors + +set -e + +# Find all mirrors +mirrors | \ + while read _mirror; do + + pushd "$_mirror" >/dev/null + + git fetch + + popd >dev/null + +done + +exit $? -- cgit v1.2.3