Perform clone in $reporoot
[girocco/mytab.git] / jobs / clonecheck.sh
blob28c828a5f23adcc782dcbce88f12f3e112a0dcd9
1 #!/bin/sh
3 . @basedir@/shlib.sh
5 shopt -s nullglob
7 cd "$cfg_mqueuedir"/to-clone
8 get_repo_list_here |
9 while read dir; do
10 mkdir -m 0775 -p "$cfg_reporoot/$(dirname "$dir")"
11 chmod 0775 "$cfg_reporoot/$dir"
12 chown ."$cfg_owning_group" "$cfg_reporoot/$dir"
13 mv "$dir" "$cfg_reporoot/$(dirname "$dir")"
14 "$cfg_basedir"/mirroring/clone.sh "$dir"
15 exit # next dir at next cron invocation, to be safe
16 done