mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
toolchain/wrapper.sh: fix remaining shellcheck warnings
Fixes following warnings: In target/toolchain/files/wrapper.sh line 18: REALNAME=$(readlink -f $0) ^-- SC2086: Double quote to prevent globbing and word splitting. -- In target/toolchain/files/wrapper.sh line 20: REALNAME_BASE=$(basename $REALNAME) ^-------^ SC2086: Double quote to prevent globbing and word splitting. -- In target/toolchain/files/wrapper.sh line 21: REALNAME_DIR=$(dirname $REALNAME) ^-------^ SC2086: Double quote to prevent globbing and word splitting. -- In target/toolchain/files/wrapper.sh line 74: exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $GCC_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_CFLAGS $TARGET_ROOTFS_CFLAGS "$@" ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting. -- In target/toolchain/files/wrapper.sh line 77: exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $LD_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_LDFLAGS "$@" ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting. -- In target/toolchain/files/wrapper.sh line 80: exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $TARGET_FUNDAMENTAL_ASFLAGS "$@" ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting. -- In target/toolchain/files/wrapper.sh line 83: exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin "$@" ^-----------------------^ SC2086: Double quote to prevent globbing and word splitting. Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
parent
d8e6a92e7c
commit
df09cc6ddb
@ -15,10 +15,10 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
PROGNAME=$0
|
PROGNAME=$0
|
||||||
REALNAME=$(readlink -f $0)
|
REALNAME=$(readlink -f "$0")
|
||||||
|
|
||||||
REALNAME_BASE=$(basename $REALNAME)
|
REALNAME_BASE=$(basename "$REALNAME")
|
||||||
REALNAME_DIR=$(dirname $REALNAME)
|
REALNAME_DIR=$(dirname "$REALNAME")
|
||||||
|
|
||||||
TARGET_FUNDAMENTAL_ASFLAGS=''
|
TARGET_FUNDAMENTAL_ASFLAGS=''
|
||||||
TARGET_FUNDAMENTAL_CFLAGS=''
|
TARGET_FUNDAMENTAL_CFLAGS=''
|
||||||
@ -30,7 +30,7 @@ TARGET_TOOLCHAIN_TRIPLET=${REALNAME_BASE%-*}
|
|||||||
BINARY=${PROGNAME##*-}
|
BINARY=${PROGNAME##*-}
|
||||||
|
|
||||||
# Parse our tool name, splitting it at '-' characters.
|
# Parse our tool name, splitting it at '-' characters.
|
||||||
IFS=- read -r TOOLCHAIN_ARCH TOOLCHAIN_BUILDROOT TOOLCHAIN_OS TOOLCHAIN_PLATFORM PROGNAME << EOF
|
IFS=- read -r _ _ _ TOOLCHAIN_PLATFORM PROGNAME << EOF
|
||||||
$REALNAME_BASE
|
$REALNAME_BASE
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -71,16 +71,16 @@ esac
|
|||||||
#
|
#
|
||||||
case $BINARY in
|
case $BINARY in
|
||||||
cc|gcc|g++|c++|cpp)
|
cc|gcc|g++|c++|cpp)
|
||||||
exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $GCC_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_CFLAGS $TARGET_ROOTFS_CFLAGS "$@"
|
exec "$TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin" $GCC_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_CFLAGS $TARGET_ROOTFS_CFLAGS "$@"
|
||||||
;;
|
;;
|
||||||
ld)
|
ld)
|
||||||
exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $LD_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_LDFLAGS "$@"
|
exec "$TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin" $LD_SYSROOT_FLAGS $TARGET_FUNDAMENTAL_LDFLAGS "$@"
|
||||||
;;
|
;;
|
||||||
as)
|
as)
|
||||||
exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin $TARGET_FUNDAMENTAL_ASFLAGS "$@"
|
exec "$TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin" $TARGET_FUNDAMENTAL_ASFLAGS "$@"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
exec $TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin "$@"
|
exec "$TARGET_TOOLCHAIN_TRIPLET-$BINARY.bin" "$@"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user