From c68bc92adf2753df4ea1489efa2b72b9f3d97581 Mon Sep 17 00:00:00 2001 From: Manuel Palenzuela Date: Sat, 29 Jun 2019 02:14:39 +0200 Subject: Fixed a bug that prevented the script from exiting --- smart-wallpaper | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/smart-wallpaper b/smart-wallpaper index 576d76a..c96e166 100755 --- a/smart-wallpaper +++ b/smart-wallpaper @@ -17,16 +17,18 @@ print_usage() { if (( $# == 0 )); then print_usage + exit 1 fi while getopts 'd:n:l:h' flag; do case "${flag}" in - d) input_daytimewallpaper="${OPTARG}";; - n) input_nighttimewallpaper="${OPTARG}";; - l) location="${OPTARG}";; - h) print_usage ;; + d) input_daytimewallpaper="${OPTARG}" ;; + n) input_nighttimewallpaper="${OPTARG}" ;; + l) location="${OPTARG}" ;; + h) print_usage + exit 0 ;; *) print_usage - exit 1 ;; + exit 1 ;; esac done @@ -62,5 +64,5 @@ do fi fi - sleep 500 + sleep 500s done -- cgit 1.4.1