]>
git.wh0rd.org - home.git/blob - .bin/r
9 acmd
=$
(git config
--get "alias.${cmd}")
13 case ${acmd:-${cmd}} in
15 if [[ $1 == "all" ]] ; then
17 branches
=$
(g b |
awk '
19 if ($0 ~ "^[*] *[(]no branch[)]") {
21 } else if ($1 == "*") {
27 END { print list b }')
28 for b
in ${branches} ; do
40 while [[ ! -d ${root}/.repo
&& ${root} != "/" ]] ; do
43 cd "${root}" ||
exit 1
45 if [[ ! -e .repo
/sandbox-url
]] ; then
46 echo "Please configure remote url base in ${root}/.repo/sandbox-url"
49 remote
=$
(<.repo
/sandbox-url
) ||
exit 1
51 echo "pushing projects from ${root}"
55 tcnt
=$
(echo "${rlist}" |
wc -l)
60 export GIT_DIR
=${path}/.git
62 printf '### (%*i/%i %3i%%) %s\n' \
63 ${#tcnt} $((cnt++)) ${tcnt} $(( cnt * 100 / tcnt )) ${proj}
65 g l
-1 ${src} >& /dev
/null || src
=
66 ( g push
--force ${remote}/${proj} ${src}:refs/sandbox/${USER}/${sync_branch} >/dev
/null
) &
68 # ssh servers do not like it when you hammer them :)
69 # Received disconnect from 74.125.248.80: 7: Too many concurrent connections
70 # fatal: The remote end hung up unexpectedly
72 if [[ ${#pids[@]} -eq 20 ]] ; then
83 exec repo
${acmd:-${cmd}} "$@"