Skip downloading existing pictures
This commit is contained in:
parent
83ddcb48fc
commit
7cb6d3f92e
1 changed files with 5 additions and 0 deletions
|
|
@ -21,6 +21,11 @@ extension="${picture_url##*.}"
|
|||
filename="${picture_date}.${extension}"
|
||||
outfile="${WALLPAPERS}/${filename}"
|
||||
|
||||
if [ -f "${outfile}" ]; then
|
||||
echo "Target file already exists"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
tempfile="$(mktemp)"
|
||||
curl \
|
||||
--location \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue