[openwrt/openwrt] base-files: reduce `sed` calls

LEDE Commits lede-commits at lists.infradead.org
Fri Sep 24 00:43:11 PDT 2021


aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9c331a6a91e870a1dc31f563333105e959f8b171

commit 9c331a6a91e870a1dc31f563333105e959f8b171
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Sat Sep 11 22:44:11 2021 -1000

    base-files: reduce `sed` calls
    
    The `sed`-script shouldn't be called multiple times, especially not with
    the same files.
    
    This commit merges all files together in a single `sed`-script call.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/base-files/Makefile | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 58ad08c63a..f87fd0fe6a 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -150,13 +150,11 @@ define Package/base-files/install
 
 	$(VERSION_SED_SCRIPT) \
 		$(1)/etc/banner \
+		$(1)/etc/device_info \
+		$(1)/etc/openwrt_release \
 		$(1)/etc/openwrt_version \
 		$(1)/usr/lib/os-release
 
-	$(VERSION_SED_SCRIPT) \
-		$(1)/etc/openwrt_release \
-		$(1)/etc/device_info \
-		$(1)/usr/lib/os-release
 
 	$(SED) "s#%PATH%#$(TARGET_INIT_PATH)#g" \
 		$(1)/sbin/hotplug-call \



More information about the lede-commits mailing list