ansiweather

Weather in terminal, with ANSI colors and Unicode symbols
Log | Files | Refs | README | LICENSE

commit 691608b783504bc1dd84d4456812a22911f20bd5
parent 8176cb3887d30000ce63e82687a5b15666e052fd
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Wed,  5 Aug 2015 19:29:17 +0200

Restoring wind directions display using the "$@" array and shifting values

Diffstat:
Mansiweather | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ansiweather b/ansiweather @@ -227,13 +227,13 @@ fi ###[ Process Wind data ]####################################################### -#declare -a directions -#directions=(N NNE NE ENE E ESE SE SSE S SSW SW WSW W WNW NW NNW) +set -- N NNE NE ENE E ESE SE SSE S SSW SW WSW W WNW NW NNW -#if [ $forecast = 0 ] -#then -# direction=${directions[$(echo "($azimuth + 11.25)/22.5 % 16" | bc)]} -#fi +if [ $forecast = 0 ] +then + shift $(echo "($azimuth + 11.25)/22.5 % 16" | bc); + direction=$1 +fi