aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-09-30 22:29:31 +0200
committerMattias Andrée <maandree@kth.se>2016-09-30 22:29:31 +0200
commitf6b139d1fbadf3285500b2bc4d2b64a9866bbdc0 (patch)
tree9bfc1aba9243668e7b850f1f913fabd95a9ce783
parentUpdate: the metar resources have moved (diff)
downloadmetar-1.3.tar.gz
metar-1.3.tar.bz2
metar-1.3.tar.xz
Allow lower case1.3
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rwxr-xr-xmetar4
1 files changed, 2 insertions, 2 deletions
diff --git a/metar b/metar
index 5d66e7b..e3c4c69 100755
--- a/metar
+++ b/metar
@@ -7,7 +7,7 @@ metar_url ()
{
url="http://tgftp.nws.noaa.gov/data/observations/metar/decoded"
if test $# = 1; then
- echo "${url}/${1}.TXT"
+ echo "${url}/$(echo "$1" | tr '[a-z]' '[A-Z]').TXT"
else
echo "${url}/"
fi
@@ -116,7 +116,7 @@ if test $# = 1 && test "$1" = "get"; then
elif test $# = 1 && test "$1" = "print"; then
get_station
elif test $# = 2 && test "$1" = "set"; then
- echo "$2" > ~/.config/metar
+ echo "$2" | tr '[a-z]' '[A-Z]' > ~/.config/metar
elif test $# = 1 && test "$1" = "list"; then
list_stations ""
elif test $# = 2 && test "$1" = "list"; then