From a1d6655334e7067fce714164d486eb49fa3a50d4 Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Wed, 11 Jul 2018 15:23:00 +0200 Subject: [PATCH] Handle no location in the text output --- wallspla.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wallspla.sh b/wallspla.sh index 5ff6920..a145b71 100755 --- a/wallspla.sh +++ b/wallspla.sh @@ -26,6 +26,10 @@ curl -Lsf -o ${WALLPAPER_LOCATION} ${photo_url} nitrogen --save --set-zoom ${WALLPAPER_LOCATION} #Put wallpaper info into text file (eg for Conky) -echo "Taken in ${photo_location} by ${photo_username}" > ${INFO_LOCATION} +if [[ "${photo_location}" == null ]] ; then + echo "Photo by ${photo_username}" > ${INFO_LOCATION} +else + echo "Taken in ${photo_location} by ${photo_username}" > ${INFO_LOCATION} +fi # vim:set ts=2 sw=2 et: