scripts: Small improvement to `cache-cobs`

This commit is contained in:
cloudhead 2024-09-02 16:20:17 +02:00
parent 4e112aaeaa
commit bc14229639
No known key found for this signature in database
1 changed files with 13 additions and 5 deletions

View File

@ -1,11 +1,19 @@
#!/bin/sh #!/bin/sh
set -e
DIRECTORY="$(rad path)/storage" DIRECTORY="$(rad path)/storage"
if [ ! -d "$DIRECTORY" ]; then
echo "Error: Directory $DIRECTORY does not exist or is not accessible."
exit 1
fi
for repo in "$DIRECTORY"/*; do for repo in "$DIRECTORY"/*; do
repo="rad:$(basename $repo)" if [ -d "$repo" ]; then
echo "Processing $repo.." rid=$(basename "$repo")
rad issue cache --repo "$repo" echo "Processing rad:$rid.."
rad patch cache --repo "$repo" rad issue cache --repo "rad:$rid"
rad patch cache --repo "rad:$rid"
echo echo
fi
done done