1 2 3 4 5 6 7 8 9 10
#!/bin/bash mirror_dir='/srv/http/arch-mirror' find "${mirror_dir}" -type f -printf '%h\n' \ | uniq \ | sort -u \ | while read -r repo_dir; do paccache -v -r -k 2 -c "${repo_dir}" done