File tree Expand file tree Collapse file tree 1 file changed +30
-16
lines changed
Expand file tree Collapse file tree 1 file changed +30
-16
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
33sites=' ko repo github2 sfjp sf.net gph '
4+ nexts=' ko repo gph github2'
45
5- while :
6- do
7- failed=
8- for remote in $sites
6+ push_retry () {
7+ sites= $1
8+ shift
9+ while :
910 do
10- printf " %s: " " $remote "
11- git push --follow-tags " $remote " " $@ " || failed=" $failed$remote "
11+ failed=
12+ for remote in $sites
13+ do
14+ printf " %s: " " $remote "
15+ git push --follow-tags " $remote " " $@ " || failed=" $failed$remote "
16+ done
17+
18+ if test -z " $failed "
19+ then
20+ break
21+ elif test " x$sites " = " x$failed "
22+ then
23+ echo >&2 " Failed to push to: $sites "
24+ exit 1
25+ fi
26+ sites=" $failed "
1227 done
28+ }
29+
30+ case " $* " in
31+ * ' +next ' * )
32+ push_retry " $nexts " " $@ "
33+ exit $?
34+ ;;
35+ esac
1336
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
21- fi
22- sites=" $failed "
23- done
37+ push_retry " $sites " " $@ "
2438
2539case " $# ,$* " in
26400,* | 1,-n)
You can’t perform that action at this time.
0 commit comments