[OpenWrt-Devel,2/3] toolchain/wrapper.sh: Replace read with read -r
diff mbox series

Message ID 20191230034118.21718-2-rosenp@gmail.com
State New
Headers show
Series
  • [OpenWrt-Devel,1/3] toolchain/wrapper: Replace legacy `` with $()
Related show

Commit Message

Rosen Penev Dec. 30, 2019, 3:41 a.m. UTC
Without -r, backslashes would get mangled.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 target/toolchain/files/wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

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