[openwrt/openwrt] toolchain/wrapper.sh: Replace read with read -r

LEDE Commits lede-commits at lists.infradead.org
Sat Jul 11 09:54:42 EDT 2020


ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d8e6a92e7cd83380448f73911fff4f5fff33ef01

commit d8e6a92e7cd83380448f73911fff4f5fff33ef01
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sun Dec 29 19:41:17 2019 -0800

    toolchain/wrapper.sh: Replace read with read -r
    
    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 2cbcc8c1e6..6078d91973 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
 



More information about the lede-commits mailing list