Files
recipes/bin/batch-relink.sh
T

9 lines
265 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
while IFS='|' read -r file slug; do
url=$(grep "^image:" "$file" | sed 's/^image:[[:space:]]*//')
echo "[$slug] Downloading from $url"
curl -sL -o "recipe-images/$slug.webp" "$url" || echo "[$slug] DOWNLOAD FAILED"
done