Compare commits

..

No commits in common. "master" and "v0.2" have entirely different histories.
master ... v0.2

2 changed files with 5 additions and 13 deletions

View File

@ -1,7 +1,7 @@
2014-01-03 2014-01-03
Version 0.1 - First release of the plugin Version 0.1 - First release of the plugin
2014-01-04 2013-01-04
Version 0.2 - Fixed two bugs, whereas one important Version 0.2 - Fixed two bugs, whereas one important
1. In case there more than one wheater alert for the specified 1. In case there more than one wheater alert for the specified
region, the script would bug out. Fixed by adding 'head -n1' region, the script would bug out. Fixed by adding 'head -n1'
@ -10,11 +10,4 @@ Version 0.2 - Fixed two bugs, whereas one important
message they would output as their HTML-equivalent. Fixed message they would output as their HTML-equivalent. Fixed
with another sed substitue command. with another sed substitue command.
2014-01-09
Version 0.3 - SMHI has changed österlen to Österlen in the text. Updated this
in the hardcoded region/district names.
2014-01-09
Version 0.4 - Fixed an important bug. If the district/region did not exist
the script exited with a status 0 (OK). This should be status 3
(Unknown). This is now fixed.

View File

@ -21,7 +21,7 @@
################################################################################ ################################################################################
# check_smhi # check_smhi
Version="0.4" Version="0.2"
Author="Jack-Benny Persson (jack-benny@cyberinfo.se)" Author="Jack-Benny Persson (jack-benny@cyberinfo.se)"
# Binaries # Binaries
@ -59,8 +59,8 @@ AvailDistricts=(
"Jämtlands län, Jämtlandsfjällen" "Jämtlands län, Jämtlandsfjällen"
"Västerbottens län, södra Lapplandsfjällen" "Västerbottens län, södra Lapplandsfjällen"
"Norrbottens län, norra Lapplandsfjällen" "Norrbottens län, norra Lapplandsfjällen"
"Skåne län utom Österlen" "Skåne län utom österlen"
"Skåne län, Österlen" "Skåne län, österlen"
"Blekinge län" "Blekinge län"
"Hallands län" "Hallands län"
"Kronobergs län, västra delen" "Kronobergs län, västra delen"
@ -113,7 +113,7 @@ print_help()
Options: Options:
-D -D
District to check for wheather alerts. District to check for wheather alerts.
NOTE: Districts must be quoted, such as "Skåne län utom Österlen" NOTE: Districts must be quoted, such as "Skåne län utom österlen"
-P -P
Print a list with all the avaliable districts. Print a list with all the avaliable districts.
-h -h
@ -195,7 +195,6 @@ done
if [ $Match -eq 0 ]; then if [ $Match -eq 0 ]; then
echo "District $District does not exist" echo "District $District does not exist"
print_help print_help
exit $State_unknown
fi fi