Makefile: replace head call with grep's -m
authorRosen Penev <rosenp@gmail.com>
Sat, 20 Aug 2022 21:12:32 +0000 (14:12 -0700)
committerChristian Marangi <ansuelsmth@gmail.com>
Sat, 10 Sep 2022 13:42:36 +0000 (15:42 +0200)
head is not necessary here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Makefile
target/sdk/files/Makefile

index 3ac110367df48105695af2ff80341ba5f7c74e85..bfb52c5ddd63ee2c38d4639c5fd7226e9103667f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
 
 world:
 
-DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -E '\/usr' | head -n 1)
+DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -E '\/usr' -m 1)
 export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
 
 ifneq ($(OPENWRT_BUILD),1)
index a710ca5f5159fe9feab21da2acc47471d946f9d6..f620f0ef01260504753e3c664b9c0a3afc8ab66b 100644 (file)
@@ -14,7 +14,7 @@ export TOPDIR LC_ALL LANG SDK
 
 world:
 
-DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -E '\/usr' | head -n 1)
+DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -E '\/usr' -m 1)
 export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
 
 ifneq ($(OPENWRT_BUILD),1)