about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-11-07 01:02:14 +0900
committerGitHub <noreply@github.com>2020-11-07 01:02:14 +0900
commit8a097f7b2c8caae3bbcbb80fed451eed066336a4 (patch)
treedf906095508de32388263afc01536954ed278895
parentd6f457d835849940b5ddb34c167b6adf24deb4c9 (diff)
parent07aef9059372f1b3bf61d88bf5917e96e487d323 (diff)
downloadrust-8a097f7b2c8caae3bbcbb80fed451eed066336a4.tar.gz
rust-8a097f7b2c8caae3bbcbb80fed451eed066336a4.zip
Rollup merge of #78666 - sasurau4:fix/shellcheck-error, r=jyn514
Fix shellcheck error

## Overview

Helps with #77290

This pr fix only errors of shellcheck, the result of `git ls-files '*.sh' | xargs shellcheck --severity=error`.

Fixing error are following.

- https://github.com/koalaman/shellcheck/wiki/SC2148
- https://github.com/koalaman/shellcheck/wiki/SC1008

Disable error following.
- https://github.com/koalaman/shellcheck/wiki/SC2068
-rwxr-xr-xscripts/cargo.sh4
-rw-r--r--scripts/config.sh1
-rwxr-xr-xtest.sh4
3 files changed, 5 insertions, 4 deletions
diff --git a/scripts/cargo.sh b/scripts/cargo.sh
index e63daa40f35..947b4a28798 100755
--- a/scripts/cargo.sh
+++ b/scripts/cargo.sh
@@ -10,7 +10,7 @@ cmd=$1
 shift || true
 
 if [[ "$cmd" = "jit" ]]; then
-cargo +${TOOLCHAIN} rustc $@ -- --jit
+cargo +${TOOLCHAIN} rustc "$@" -- --jit
 else
-cargo +${TOOLCHAIN} $cmd $@
+cargo +${TOOLCHAIN} $cmd "$@"
 fi
diff --git a/scripts/config.sh b/scripts/config.sh
index af181f4f724..6120a550a27 100644
--- a/scripts/config.sh
+++ b/scripts/config.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
 set -e
 
 unamestr=`uname`
diff --git a/test.sh b/test.sh
index 3cdd4119d79..c6c4956e481 100755
--- a/test.sh
+++ b/test.sh
@@ -3,13 +3,13 @@ set -e
 
 export RUSTFLAGS="-Zrun_dsymutil=no"
 
-./build.sh --without-sysroot $@
+./build.sh --without-sysroot "$@"
 
 rm -r target/out || true
 
 scripts/tests.sh no_sysroot
 
-./build.sh $@
+./build.sh "$@"
 
 scripts/tests.sh base_sysroot
 scripts/tests.sh extended_sysroot