diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/clone-mirror | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bin/clone-mirror b/bin/clone-mirror index cd5c035..cffdc15 100755 --- a/bin/clone-mirror +++ b/bin/clone-mirror @@ -3,8 +3,14 @@ work_dir=$(readlink -e "$0") work_dir="${work_dir%/*/*}/work" -mkdir -p "${work_dir}/archlinuxarm/" +mkdir -p "${work_dir}/sticks/" -rsync -rlptH --safe-links --delete-delay --delay-updates \ - 'rsync://de3.mirror.archlinuxarm.org/archlinux-arm/' \ - "${work_dir}/archlinuxarm/" +for stick_dir in "${work_dir}/sticks/"*; do + [ -d "${stick_dir}" ] || continue + mountpoint -q "${stick_dir}" || continue + mkdir "${stick_dir}/archlinuxarm" + rsync -rlptH --safe-links --delete-delay --delay-updates \ + --copy-dest="${work_dir}/sticks/"*"/archlinuxarm" \ + 'rsync://de3.mirror.archlinuxarm.org/archlinux-arm/' \ + "${stick_dir}/archlinuxarm" +done |