about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xsmart-wallpaper14
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