From: Christian Marangi Date: Sat, 17 Dec 2022 15:39:00 +0000 (+0100) Subject: rules: fix broken commitcount on alpine system X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9aa95bbebb07554ccf6f611ead081f85e1f8b902;p=openwrt%2Fstaging%2Fblocktrron.git rules: fix broken commitcount on alpine system To generate commitcount we use grep --max-count. This is not present on alpine grep and cause wrong generation. Use -m as it's just the short version of --max-count and more portable. Fixes: #11200 Signed-off-by: Christian Marangi (cherry picked from commit eb7ffeafbfa78235b05abb4ae479376150d7a814) --- diff --git a/rules.mk b/rules.mk index c893f61b0f..1c6b3abd57 100644 --- a/rules.mk +++ b/rules.mk @@ -412,7 +412,7 @@ $(shell \ if git log -1 >/dev/null 2>/dev/null; then \ if [ -n "$(1)" ]; then \ last_bump="$$(git log --pretty=format:'%h %s' . | \ - grep --max-count=1 -e ': [uU]pdate to ' -e ': [bB]ump to ' | \ + grep -m 1 -e ': [uU]pdate to ' -e ': [bB]ump to ' | \ cut -f 1 -d ' ')"; \ fi; \ if [ -n "$$last_bump" ]; then \