make/scripts/hgforest.sh

changeset 446
dd596160b323
parent 437
8a4e92c10a9a
child 462
ba77d95ed219
equal deleted inserted replaced
440:1a8c7c530f8a 446:dd596160b323
110 ) > ${tmp}/repo.${n} 2>&1 ; cat ${tmp}/repo.${n} ) & 110 ) > ${tmp}/repo.${n} 2>&1 ; cat ${tmp}/repo.${n} ) &
111 if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then 111 if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then
112 sleep 5 112 sleep 5
113 fi 113 fi
114 done 114 done
115 # Wait for all hg commands to complete
116 wait
117
115 if [ "${repos_extra}" != "" ] ; then 118 if [ "${repos_extra}" != "" ] ; then
116 for i in ${repos_extra} ; do 119 for i in ${repos_extra} ; do
117 echo "Starting on ${i}" 120 echo "Starting on ${i}"
118 n=`expr ${n} '+' 1` 121 n=`expr ${n} '+' 1`
119 ( 122 (
125 ) > ${tmp}/repo.${n} 2>&1 ; cat ${tmp}/repo.${n} ) & 128 ) > ${tmp}/repo.${n} 2>&1 ; cat ${tmp}/repo.${n} ) &
126 if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then 129 if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then
127 sleep 5 130 sleep 5
128 fi 131 fi
129 done 132 done
133 # Wait for all hg commands to complete
134 wait
130 fi 135 fi
131
132 # Wait for all hg commands to complete
133 wait
134 136
135 # Cleanup 137 # Cleanup
136 rm -f -r ${tmp} 138 rm -f -r ${tmp}
137 139
138 # Terminate with exit 0 all the time (hard to know when to say "failed") 140 # Terminate with exit 0 all the time (hard to know when to say "failed")

mercurial