Replace deprecated use of egrep
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
b02b2ff3ac
commit
7f9a4c2476
1 changed files with 8 additions and 8 deletions
|
@ -3,16 +3,16 @@
|
||||||
HOOKTYPE=$1
|
HOOKTYPE=$1
|
||||||
|
|
||||||
if [ -e Justfile ]; then
|
if [ -e Justfile ]; then
|
||||||
just --list --list-heading '' --list-prefix '' |
|
just --list --list-heading '' --list-prefix '' |
|
||||||
grep -q "auto-hook-${HOOKTYPE}" && exec just "auto-hook-${HOOKTYPE}" || true
|
grep -q "auto-hook-${HOOKTYPE}" && exec just "auto-hook-${HOOKTYPE}" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e Makefile ]; then
|
if [ -e Makefile ]; then
|
||||||
TARGETS=$(make -pRrq : 2>/dev/null |
|
TARGETS=$(make -pRrq : 2>/dev/null |
|
||||||
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' |
|
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' |
|
||||||
sort | egrep -v -e '^[^[:alnum:]]' | sed 's/:$//' | xargs)
|
sort | grep -E -v -e '^[^[:alnum:]]' | sed 's/:$//' | xargs)
|
||||||
|
|
||||||
if (echo $TARGETS | grep -q "auto-hook-${HOOKTYPE}"); then
|
if (echo $TARGETS | grep -q "auto-hook-${HOOKTYPE}"); then
|
||||||
exec make "auto-hook-${HOOKTYPE}"
|
exec make "auto-hook-${HOOKTYPE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue