From 36be6ff16fefa872f15a8a42fda47cb0b2c831e3 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Wed, 19 Apr 2023 22:27:26 +0300 Subject: [PATCH] Add usage --- earth_wallpaper.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/earth_wallpaper.sh b/earth_wallpaper.sh index 7aacfd7..35554f9 100755 --- a/earth_wallpaper.sh +++ b/earth_wallpaper.sh @@ -37,6 +37,11 @@ check_font() { fi } +usage() { + echo "Usage:" + echo "$(basename "${0}") --city [--help] [--temperature-unit celsius|fahrenheit] [--wallpaper-file ] [--archive-folder ] [--screen-width ] [--font-name ] [--debug] [--logfile]" +} + temp_unit=celsius wallpaper_file="${HOME}/wallpaper.jpg" wallpaper_file2="/etc/lightdm/background.jpg" @@ -50,6 +55,11 @@ font_name=$("${gsettings_cmd}" get org.gnome.desktop.interface font-name | sed " while [ $# -gt 0 ] do case "$1" in + "--help") + shift + usage + exit 0 + ;; "--temperature-unit") shift temp_unit="${1}"