Update the wallpaper even if the image file already exists
This commit is contained in:
parent
277b60c13e
commit
ec2016c6d1
1 changed files with 8 additions and 8 deletions
|
|
@ -23,16 +23,16 @@ outfile="${WALLPAPERS}/${filename}"
|
|||
|
||||
if [ -f "${outfile}" ]; then
|
||||
echo "Target file already exists"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
tempfile="$(mktemp)"
|
||||
curl \
|
||||
else
|
||||
tempfile="$(mktemp)"
|
||||
curl \
|
||||
--location \
|
||||
--output "${tempfile}" \
|
||||
--silent \
|
||||
"${picture_url}"
|
||||
mv "${tempfile}" "${outfile}"
|
||||
mv "${tempfile}" "${outfile}"
|
||||
fi
|
||||
|
||||
ln \
|
||||
--force \
|
||||
--symbolic \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue