Skip to content

Commit

Permalink
Merge pull request #288 from guimochila/master
Browse files Browse the repository at this point in the history
fix: emulate timeout command for OSX
  • Loading branch information
ethancedwards8 authored Sep 16, 2024
2 parents 6999a95 + 297cc98 commit 66e0910
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/weather.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 66e0910

Please sign in to comment.