From 7a0daa9fb3161e980448f5436a2b12b1072c9599 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Mon, 11 Dec 2023 06:59:16 +0000 Subject: [PATCH] od: Simplify MODEL query in gmenu2x.sh `/sys/firmware/devicetree/base/compatible` is `\0`-delimited. Instead of relying on `\0`-removal and stripping the `ingenic.*` suffix, simply read the string up to the first `\0`. Follow-up to https://github.com/OpenDingux/buildroot/pull/97 which did this for other script. Signed-off-by: Gleb Mazovetskiy --- board/opendingux/package/gmenu2x/gmenu2x.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/opendingux/package/gmenu2x/gmenu2x.sh b/board/opendingux/package/gmenu2x/gmenu2x.sh index 97691c78471b..59aa9a47f6f6 100644 --- a/board/opendingux/package/gmenu2x/gmenu2x.sh +++ b/board/opendingux/package/gmenu2x/gmenu2x.sh @@ -2,7 +2,7 @@ PLATFORMS=$(sed -n 's/^opkPlatforms="\(.*\)"$/\1/p' /usr/share/gmenu2x/gmenu2x.conf) -MODEL=$(sed -n 's/.*,\(.*\)ingenic.*/\1/p' /sys/firmware/devicetree/base/compatible) +IFS= read -r -d $'\0' MODEL