[OpenWrt-Devel] [PATCH 2/3] toolchain/wrapper.sh: Replace read with read -r
Rosen Penev
rosenp at gmail.com
Sun Dec 29 22:41:17 EST 2019
Without -r, backslashes would get mangled.
Found with shellcheck.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
target/toolchain/files/wrapper.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/toolchain/files/wrapper.sh b/target/toolchain/files/wrapper.sh
index bd4996cac2..ba2b34778f 100755
--- a/target/toolchain/files/wrapper.sh
+++ b/target/toolchain/files/wrapper.sh
@@ -30,7 +30,7 @@ TARGET_TOOLCHAIN_TRIPLET=${REALNAME_BASE%-*}
BINARY=${PROGNAME##*-}
# Parse our tool name, splitting it at '-' characters.
-IFS=- read TOOLCHAIN_ARCH TOOLCHAIN_BUILDROOT TOOLCHAIN_OS TOOLCHAIN_PLATFORM PROGNAME << EOF
+IFS=- read -r TOOLCHAIN_ARCH TOOLCHAIN_BUILDROOT TOOLCHAIN_OS TOOLCHAIN_PLATFORM PROGNAME << EOF
$REALNAME_BASE
EOF
--
2.24.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list