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
This commit is contained in:
commit
7931b2454d
38 changed files with 47 additions and 23 deletions
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
unamestr=`uname`
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -17,7 +17,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
set -x
|
||||
|
|
|
@ -22,7 +22,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
set -x
|
||||
|
|
|
@ -11,7 +11,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
rm /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
|
|
|
@ -12,7 +12,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
rm /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
|
|
|
@ -12,7 +12,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
rm /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
|
|
|
@ -12,7 +12,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
rm /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
|
|
|
@ -11,7 +11,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
rm /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
hide_output() {
|
||||
set +x
|
||||
on_err="
|
||||
|
@ -8,7 +9,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
set -x
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
hide_output() {
|
||||
set +x
|
||||
on_err="
|
||||
|
@ -8,7 +9,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
set -x
|
||||
|
|
|
@ -12,7 +12,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
rm /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
# Mirrored from https://github.com/crosstool-ng/crosstool-ng/archive/crosstool-ng-1.24.0.tar.gz
|
||||
|
|
|
@ -11,7 +11,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
rm /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
|
|
|
@ -11,7 +11,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
rm /tmp/build.log
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
mkdir /usr/local/mips-linux-musl
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
mkdir /usr/local/mipsel-linux-musl
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
hide_output() {
|
||||
{ set +x; } 2>/dev/null
|
||||
on_err="
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
hide_output() {
|
||||
set +x
|
||||
on_err="
|
||||
|
@ -8,7 +9,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
set -x
|
||||
|
|
|
@ -13,7 +13,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
rm /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
apt-get update
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
URL=https://dl.google.com/android/repository
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
export ANDROID_HOME=/android/sdk
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
automake \
|
||||
bison \
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
# Mirrored from https://github.com/crosstool-ng/crosstool-ng/archive/crosstool-ng-1.24.0.tar.gz
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
url="https://github.com/crosstool-ng/crosstool-ng/archive/crosstool-ng-1.22.0.tar.gz"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
hide_output() {
|
||||
|
@ -10,7 +11,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
rm -f /tmp/build.log
|
||||
|
|
|
@ -19,7 +19,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
local ping_loop_pid=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
trap - ERR
|
||||
kill $ping_loop_pid
|
||||
set -x
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
curl -f https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf -
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
# This script runs `musl-cross-make` to prepare C toolchain (Binutils, GCC, musl itself)
|
||||
# and builds static libunwind that we distribute for static target.
|
||||
#
|
||||
|
@ -19,7 +20,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
rm /tmp/build.log
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
hide_output() {
|
||||
|
@ -10,7 +11,7 @@ exit 1
|
|||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
$@ &> /tmp/build.log
|
||||
"$@" &> /tmp/build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
rm /tmp/build.log
|
||||
|
@ -32,7 +33,7 @@ if [ ! -d $MUSL ]; then
|
|||
fi
|
||||
|
||||
cd $MUSL
|
||||
./configure --enable-optimize --enable-debug --disable-shared --prefix=/musl-$TAG $@
|
||||
./configure --enable-optimize --enable-debug --disable-shared --prefix=/musl-$TAG "$@"
|
||||
if [ "$TAG" = "i586" -o "$TAG" = "i686" ]; then
|
||||
hide_output make -j$(nproc) AR=ar RANLIB=ranlib
|
||||
else
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
case "$(uname -m)" in
|
||||
|
|
|
@ -53,6 +53,7 @@ modules=($modules)
|
|||
use_git=""
|
||||
urls="$(git config --file .gitmodules --get-regexp '\.url$' | cut -d' ' -f2)"
|
||||
urls=($urls)
|
||||
# shellcheck disable=SC2068
|
||||
for i in ${!modules[@]}; do
|
||||
module=${modules[$i]}
|
||||
if [[ " $included " = *" $module "* ]]; then
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/false
|
||||
# shellcheck shell=bash
|
||||
|
||||
# This file is intended to be sourced with `. shared.sh` or
|
||||
# `source shared.sh`, hence the invalid shebang and not being
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -exuo pipefail
|
||||
|
||||
CRATE=example
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
set -exuo pipefail
|
||||
|
||||
function build {
|
||||
|
|
Loading…
Add table
Reference in a new issue