ansiweather

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

commit 120877dcf337841a1b157fc02e50b45d0b617ff7
parent a327e768d90b50845980821ff0ebf78ef5920042
Author: Thomas Feagin <tom.feagin@gmail.com>
Date:   Sat,  2 Nov 2013 09:36:32 -0400

Added OS check to use correct options for date with Linux

Diffstat:
Mansiweather | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ansiweather b/ansiweather @@ -143,7 +143,12 @@ weather=$($fetch_cmd "http://api.openweathermap.org/data/2.5/$api_cmd?q=$locatio ###[ Process Weather data ]#################################################### function epoch_to_date { - ret=$(date -j -r $1 +"%a %b %d") + unamestr=$(uname) + if [[ "$unamestr" == 'Linux' ]]; then + ret=$(date -d @$1 +"%a %b %d") + else + ret=$(date -j -r $1 +"%a %b %d") + fi echo $ret }