diff --git a/get_weather.sh b/get_weather.sh index d350e88..d114ab0 100644 --- a/get_weather.sh +++ b/get_weather.sh @@ -12,8 +12,22 @@ # log all of the status and error messages function log_message() { - echo $(date)" | "$* + # echo $(date)" | "$* + echo $* } + +function show_help() { +# Show the help documentation + log_message "" + log_message "Usage:" + log_message "get_weather.sh " + log_message "" + log_message "Param can be replaced with one of the following:" + log_message "configfile - The full path of the configuration file." + log_message "help - Show the help information about this script." + log_message "" + log_message "For more information, visit https://github.com/bitsecondal/farmosnws" +} ## SCRIPT MAIN ## SCRIPT MAIN ## SCRIPT MAIN ## ## SCRIPT MAIN ## SCRIPT MAIN ## SCRIPT MAIN ## @@ -37,6 +51,7 @@ if [[ -f ${FILENAME} ]]; then log_message "Done getting the weather data" else - log_message "Configuration file does not exist." + log_message "Configuration file does not exist." + show_help fi