From: Siraaj Khandkar Date: Wed, 28 Oct 2020 11:06:00 +0000 (-0400) Subject: Use GNU grap on Mac X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=ca0c92b8b74a45bcfbf14198f3d46aa9bf619fd9;p=khome.git Use GNU grap on Mac --- diff --git a/Makefile b/Makefile index 19014a3..f8087cf 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,11 @@ MAKEFLAGS := --no-builtin-rules DEPS := $(wildcard deps/*) ifeq ($(shell uname),Darwin) + GREP := ggrep SED := gsed DIFF := $(shell gls -t1 /usr/local/Cellar/diffutils/*/bin/diff | head -1) else + GREP := grep SED := sed DIFF := diff endif @@ -41,7 +43,7 @@ home: mpdconf compiled cp -Rp bin $(HOME)/ # Limit depth because directories are copied recursively: find home -maxdepth 1 -print0 \ - | grep -zv '^home$$' \ + | $(GREP) -zv '^home$$' \ | xargs -0 -I% cp -Rp % ~ mpdconf: