ansiweather

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

commit 6427ffaec4206f77a41a5eb52c4077067ea949d8
parent 1bf0200d33d84187b22efcd9aafea09075452e8d
Author: jmoore <josh@glencoesoftware.com>
Date:   Sat, 23 Nov 2013 14:07:44 +0100

Handle sunrise and sunset being unset

For "Walluf, Germany", the sunrise and sunset variables
were being left unset resulting in:
```
./ansiweather: line 211: [: 1385212168: unary operator expected
./ansiweather: line 211: [: 1385212168: unary operator expected
```

Diffstat:
Mansiweather | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ansiweather b/ansiweather @@ -208,7 +208,10 @@ if [ $forecast != 0 ] then period="none" else - if [ $now -ge $sunset ] || [ $now -le $sunrise ] + if [ -z "$sunset" ] || [ -z "$sunrise" ] + then + period="day" + elif [ $now -ge $sunset ] || [ $now -le $sunrise ] then period="night" else