diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-06-29 02:14:39 +0200 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-06-29 02:14:39 +0200 |
commit | c68bc92adf2753df4ea1489efa2b72b9f3d97581 (patch) | |
tree | 7bf16cd6749bf230e385266fa83e982ec415f605 | |
parent | Complete rewrite, many improvements (diff) | |
download | smart-wallpaper-c68bc92adf2753df4ea1489efa2b72b9f3d97581.tar.gz smart-wallpaper-c68bc92adf2753df4ea1489efa2b72b9f3d97581.tar.bz2 smart-wallpaper-c68bc92adf2753df4ea1489efa2b72b9f3d97581.zip |
Fixed a bug that prevented the script from exiting
-rwxr-xr-x | smart-wallpaper | 14 |
1 files 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 |