commit 7a280a839e9934bd15a4eedf31d5d5c8856813a6
parent 1466f294f2388d576c2e51a5de5a4196efe6ee7d
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date: Wed, 23 Oct 2013 14:56:11 -0700
Merge pull request #21 from mfontani/location-as-parameter
When given, take location from the first command-line arg (Closes #15)
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/ansiweather b/ansiweather
@@ -36,6 +36,9 @@ function get_config {
# Location : example "Moscow,RU"
location=$(get_config "location" || echo "Moscow,RU")
+if [ ! -z "$1" ]; then
+ location=$1;
+fi
# System of Units : "metric" or "imperial"
units=$(get_config "units" || echo "metric")