summaryrefslogtreecommitdiff
path: root/bin/clone-mirror
blob: cffdc1542f06ff1781e3ab149686b57a372385e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

work_dir=$(readlink -e "$0")
work_dir="${work_dir%/*/*}/work"

mkdir -p "${work_dir}/sticks/"

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