summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-09-20 19:57:09 +0200
committerErich Eckner <git@eckner.net>2021-09-20 19:57:09 +0200
commit0bd58fa94828433f9eb240c63bb29cb81815d90d (patch)
treeb592c751a35cee520070e371cde34b4747e15251
parent907b3a02e0575cf8a3fad767fe0ca0ac8d5e7dc5 (diff)
downloadarch-mirror-0bd58fa94828433f9eb240c63bb29cb81815d90d.tar.xz
clean-cache: do a `readlink` on the mirror_dir
-rwxr-xr-xclean-cache7
1 files changed, 6 insertions, 1 deletions
diff --git a/clean-cache b/clean-cache
index 412da37..e58107a 100755
--- a/clean-cache
+++ b/clean-cache
@@ -1,6 +1,6 @@
#!/bin/bash
-mirror_dir='/srv/http/arch-mirror'
+mirror_dir=$(readlink -e '/srv/http/arch-mirror')
find "${mirror_dir}" -type f -printf '%h\n' \
| uniq \
@@ -37,3 +37,8 @@ find "${mirror_dir}" -type f -printf '%h\n' \
rm "${repo_dir}/${file}"
done
done
+
+find "${mirror_dir}" -type f -name '*.pkg.tar.zst' \
+| while read -r pkg; do
+ [ -f "${pkg}.sig" ] || echo "$f"
+done