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,9 +23,7 @@ outfile="${WALLPAPERS}/${filename}"
|
||||||
|
|
||||||
if [ -f "${outfile}" ]; then
|
if [ -f "${outfile}" ]; then
|
||||||
echo "Target file already exists"
|
echo "Target file already exists"
|
||||||
exit 0
|
else
|
||||||
fi
|
|
||||||
|
|
||||||
tempfile="$(mktemp)"
|
tempfile="$(mktemp)"
|
||||||
curl \
|
curl \
|
||||||
--location \
|
--location \
|
||||||
|
|
@ -33,6 +31,8 @@ curl \
|
||||||
--silent \
|
--silent \
|
||||||
"${picture_url}"
|
"${picture_url}"
|
||||||
mv "${tempfile}" "${outfile}"
|
mv "${tempfile}" "${outfile}"
|
||||||
|
fi
|
||||||
|
|
||||||
ln \
|
ln \
|
||||||
--force \
|
--force \
|
||||||
--symbolic \
|
--symbolic \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue