diff --git a/scripts/weather.sh b/scripts/weather.sh index 4b56c55f..26b45f3b 100755 --- a/scripts/weather.sh +++ b/scripts/weather.sh @@ -6,6 +6,13 @@ fahrenheit=$1 location=$2 fixedlocation=$3 +# emulate timeout command from bash - timeout is not available by default on OSX +if [ "$(uname)" == "Darwin" ]; then + timeout() { + perl -e 'alarm shift; exec @ARGV' "$duration" "$@" + } +fi + display_location() { if $location && [[ ! -z "$fixedlocation" ]]; then