From 3e3caba6d10f8eac1bf71128e8aedb5b06e1371a Mon Sep 17 00:00:00 2001 From: Daniel Tsvetkov Date: Sat, 16 Dec 2017 00:37:23 +0200 Subject: [PATCH] fix exists/not exists case --- apod.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apod.sh b/apod.sh index 59ac848..4a213ed 100755 --- a/apod.sh +++ b/apod.sh @@ -2,8 +2,8 @@ NASA_APOD_BASE_URL="https://apod.nasa.gov/apod" IMAGE_URL=`curl -s $NASA_APOD_BASE_URL/astropix.html | grep -oh 'href="image/.*"' | grep -oh 'image/.*jpg' | head -1` if [ -z "$IMAGE_URL" ]; then - curl -s "$NASA_APOD_BASE_URL/$IMAGE_URL" > image.jpg gsettings set org.gnome.desktop.background picture-uri "file:///home/pi2/Pictures/wallpapers/blue_galaxy_wallpaper.png" else + curl -s "$NASA_APOD_BASE_URL/$IMAGE_URL" > image.jpg gsettings set org.gnome.desktop.background picture-uri "file:///$(pwd)/image.jpg" fi