include/rootfs: improve readability of OPKG status fixup block
authorChristian Marangi <ansuelsmth@gmail.com>
Tue, 11 Jun 2024 11:03:17 +0000 (13:03 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 11 Jun 2024 21:58:12 +0000 (23:58 +0200)
Improve readability of OPKG status fixup block.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
include/rootfs.mk

index 23692a3a8233e635c1c05b4413256fffd2257c0f..554dd48460caed50bd0506307f7a68c9ec77bb73 100644 (file)
@@ -95,12 +95,12 @@ define prepare_rootfs
                        [ -n "$(CONFIG_USE_APK)" ] && $(STAGING_DIR_HOST)/bin/tar --delete -f ./lib/apk/db/scripts.tar $$(basename $$script); \
                done; \
                if [ -z "$(CONFIG_USE_APK)" ]; then \
-               $(if $(IB),,awk -i inplace \
-                       '/^Status:/ { \
-                               if ($$3 == "user") { $$3 = "ok" } \
-                               else { sub(/,\<user\>|\<user\>,/, "", $$3) } \
-                       }1' $(1)/usr/lib/opkg/status) ; \
-               $(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(1)/usr/lib/opkg/status ;) \
+                       $(if $(IB),,awk -i inplace \
+                               '/^Status:/ { \
+                                       if ($$3 == "user") { $$3 = "ok" } \
+                                       else { sub(/,\<user\>|\<user\>,/, "", $$3) } \
+                               }1' $(1)/usr/lib/opkg/status) ; \
+                       $(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(1)/usr/lib/opkg/status ;) \
                fi; \
                for script in ./etc/init.d/*; do \
                        grep '#!/bin/sh /etc/rc.common' $$script >/dev/null || continue; \