mirror of
https://github.com/XAMPPRocky/tokei
synced 2024-11-05 02:39:35 +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
4 changed files with 12 additions and 13 deletions
|
@ -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:'
|
echo 'Please enter the path you would like to benchmark:'
|
||||||
|
|
||||||
if [ -z ${FILE+x} ]; then
|
if [ -z ${FILE+x} ]; then
|
||||||
read input
|
read -r input
|
||||||
else
|
else
|
||||||
input=$FILE
|
input=$FILE
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -11,13 +11,12 @@ TARGET_TRIPLE=$2
|
||||||
# $3 {boolean} = Whether or not building for release or not.
|
# $3 {boolean} = Whether or not building for release or not.
|
||||||
RELEASE_BUILD=$3
|
RELEASE_BUILD=$3
|
||||||
|
|
||||||
required_arg $CROSS 'CROSS'
|
required_arg "$CROSS" 'CROSS'
|
||||||
required_arg $TARGET_TRIPLE '<Target Triple>'
|
required_arg "$TARGET_TRIPLE" '<Target Triple>'
|
||||||
|
|
||||||
if [ -z "$RELEASE_BUILD" ]; then
|
if [ -z "$RELEASE_BUILD" ]; then
|
||||||
$CROSS build --target $TARGET_TRIPLE
|
$CROSS build --target "$TARGET_TRIPLE"
|
||||||
$CROSS build --target $TARGET_TRIPLE --all-features
|
$CROSS build --target "$TARGET_TRIPLE" --all-features
|
||||||
else
|
else
|
||||||
$CROSS build --target $TARGET_TRIPLE --all-features --release
|
$CROSS build --target "$TARGET_TRIPLE" --all-features --release
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
rustup default $1
|
rustup default "$1"
|
||||||
rustup target add $2
|
rustup target add "$2"
|
||||||
|
|
|
@ -9,8 +9,8 @@ CROSS=$1
|
||||||
# $1 {string} = <Target Triple>
|
# $1 {string} = <Target Triple>
|
||||||
TARGET_TRIPLE=$2
|
TARGET_TRIPLE=$2
|
||||||
|
|
||||||
required_arg $CROSS 'CROSS'
|
required_arg "$CROSS" 'CROSS'
|
||||||
required_arg $TARGET_TRIPLE '<Target Triple>'
|
required_arg "$TARGET_TRIPLE" '<Target Triple>'
|
||||||
|
|
||||||
$CROSS test --target $TARGET_TRIPLE
|
$CROSS test --target "$TARGET_TRIPLE"
|
||||||
$CROSS build --target $TARGET_TRIPLE --all-features
|
$CROSS build --target "$TARGET_TRIPLE" --all-features
|
||||||
|
|
Loading…
Reference in a new issue