Skip downloading existing pictures

This commit is contained in:
Ohad Livne 2025-06-25 22:28:04 +03:00
parent e68569bc81
commit 1b03164a31
Signed by: libohad-dev
GPG key ID: 34FDC68B51191A4D

View file

@ -21,6 +21,11 @@ extension="${picture_url##*.}"
filename="${picture_date}.${extension}" filename="${picture_date}.${extension}"
outfile="${WALLPAPERS}/${filename}" outfile="${WALLPAPERS}/${filename}"
if [ -f "${outfile}" ]; then
echo "Target file already exists"
exit 0
fi
tempfile="$(mktemp)" tempfile="$(mktemp)"
curl \ curl \
--location \ --location \