What's cooking (2014/01 #01)
[alt-git.git] / pushall
blobd262e9f823a74c82b976369e4453144ca6e3a67c
1 #!/bin/sh
3 sites='ko repo github2 sfjp sf.net gph '
5 while :
6 do
7 failed=
8 for remote in $sites
9 do
10 printf "%s: " "$remote"
11 git push --follow-tags "$remote" "$@" || failed="$failed$remote "
12 done
14 if test -z "$failed"
15 then
16 break
17 elif test "x$sites" = "x$failed"
18 then
19 echo >&2 "Failed to push to: $sites"
20 exit 1
22 sites="$failed"
23 done
25 case "$#,$*" in
26 0,* | 1,-n)
27 printf "github mirror: "
28 git push github "$@" || exit $?
29 for topic in htmldocs manpages
31 printf "%s: " "$topic"
32 ( cd ../git-$topic.git && git push "$@") || exit
33 done
35 esac