diff --git a/cache-restore.sh b/cache-restore.sh index 8e1a5ff..b5d8208 100644 --- a/cache-restore.sh +++ b/cache-restore.sh @@ -2,5 +2,9 @@ mc alias set storage "$STORAGE_URL" root "$MINIO_SECRET" for f in $(mc ls --json storage/isos/cache | jq '.key' | tr -d '"'); do - mc get -q "storage/isos/cache/$f" "./cache/$f" + if [ ! -e "./cache/$f" ]; then + mc get -q "storage/isos/cache/$f" "./cache/$f" + else + echo "Skipping already present: $f" + fi done