Skip to content

Commit

Permalink
Use GNU date and sed by default on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
fnkr committed Jan 17, 2018
1 parent 5972db3 commit eccf1c5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lectl
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
# Create auto-update version (comming soon)

#Variables for utilities
_date=date #Change date by gdate if you are using homebrew on OS X
_sed=sed #Change sed by gsed if you are using homebrew on OS X
_date=date
_sed=sed
_grep=grep
_curl=curl
_awk=awk
Expand All @@ -106,6 +106,12 @@ _tail=tail
_tr=tr
_wc=wc

# macOS compatibility
if [ "$(uname)" = "Darwin" ]; then
_date=gdate
_sed=gsed
fi

# Script version/name variables
version='0.11'
scriptname='lectl'
Expand Down

0 comments on commit eccf1c5

Please sign in to comment.