summaryrefslogtreecommitdiff
path: root/clean-cache
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-09-23 13:07:20 +0200
committerErich Eckner <git@eckner.net>2020-09-23 13:07:20 +0200
commit6f4be056a52020242f7ddd55e8528bc9a7b1ab7f (patch)
treeac0a3e10bad21bf04327fc21941ae5ddbf29da8a /clean-cache
parentb31a837e7bdb2ea07be501965e5626d0b41d0fd3 (diff)
downloadarch-mirror-6f4be056a52020242f7ddd55e8528bc9a7b1ab7f.tar.xz
clean-cache new: start of trantision to nginx cache
Diffstat (limited to 'clean-cache')
-rwxr-xr-xclean-cache11
1 files changed, 11 insertions, 0 deletions
diff --git a/clean-cache b/clean-cache
new file mode 100755
index 0000000..35bc6a7
--- /dev/null
+++ b/clean-cache
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+mirror_dir='/srv/http/arch-mirror'
+
+for repo_dir in $(
+ find "${mirror_dir}" -type f -printf '%h\n' \
+ | uniq \
+ | sort -u
+); do
+ paccache -v -r -k 2 -c "${repo_dir}"
+done