commit 08fe7c3bde09ac5f0d9ad65a6b59e3b902705a27 parent 96322e9f7a8a55575abba11e52fc4133c9b448fd Author: Frederic Cambus <fcambus@users.sourceforge.net> Date: Sat, 23 Nov 2013 07:11:25 -0800 Merge pull request #38 from joshmoore/sunrise-fix Handle sunrise and sunset being unset Diffstat:
M | ansiweather | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ansiweather b/ansiweather @@ -210,7 +210,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