Skip downloading existing pictures
This commit is contained in:
parent
e68569bc81
commit
1b03164a31
1 changed files with 5 additions and 0 deletions
|
|
@ -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 \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue