mirror of
https://github.com/XAMPPRocky/tokei
synced 2024-09-29 20:43:51 +00:00
fix: shellcheck warnings (#663)
SC2086: Double quote to prevent globbing and word splitting. SC2162: read without -r will mangle backslashes
This commit is contained in:
parent
feb0631414
commit
e608b7d344
|
@ -22,7 +22,7 @@ echo "The use of this tool requires $REQUIRED to be installed and available in y
|
|||
echo 'Please enter the path you would like to benchmark:'
|
||||
|
||||
if [ -z ${FILE+x} ]; then
|
||||
read input
|
||||
read -r input
|
||||
else
|
||||
input=$FILE
|
||||
fi
|
||||
|
|
|
@ -11,13 +11,12 @@ TARGET_TRIPLE=$2
|
|||
# $3 {boolean} = Whether or not building for release or not.
|
||||
RELEASE_BUILD=$3
|
||||
|
||||
required_arg $CROSS 'CROSS'
|
||||
required_arg $TARGET_TRIPLE '<Target Triple>'
|
||||
required_arg "$CROSS" 'CROSS'
|
||||
required_arg "$TARGET_TRIPLE" '<Target Triple>'
|
||||
|
||||
if [ -z "$RELEASE_BUILD" ]; then
|
||||
$CROSS build --target $TARGET_TRIPLE
|
||||
$CROSS build --target $TARGET_TRIPLE --all-features
|
||||
$CROSS build --target "$TARGET_TRIPLE"
|
||||
$CROSS build --target "$TARGET_TRIPLE" --all-features
|
||||
else
|
||||
$CROSS build --target $TARGET_TRIPLE --all-features --release
|
||||
$CROSS build --target "$TARGET_TRIPLE" --all-features --release
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
rustup default $1
|
||||
rustup target add $2
|
||||
rustup default "$1"
|
||||
rustup target add "$2"
|
||||
|
|
|
@ -9,8 +9,8 @@ CROSS=$1
|
|||
# $1 {string} = <Target Triple>
|
||||
TARGET_TRIPLE=$2
|
||||
|
||||
required_arg $CROSS 'CROSS'
|
||||
required_arg $TARGET_TRIPLE '<Target Triple>'
|
||||
required_arg "$CROSS" 'CROSS'
|
||||
required_arg "$TARGET_TRIPLE" '<Target Triple>'
|
||||
|
||||
$CROSS test --target $TARGET_TRIPLE
|
||||
$CROSS build --target $TARGET_TRIPLE --all-features
|
||||
$CROSS test --target "$TARGET_TRIPLE"
|
||||
$CROSS build --target "$TARGET_TRIPLE" --all-features
|
||||
|
|
Loading…
Reference in a new issue