Skip to content

Commit 0f10f2a

Browse files
manually fix some shellcheck warnings
1 parent d6a9dfa commit 0f10f2a

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

scripts/cargo.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ cmd=$1
1010
shift || true
1111

1212
if [[ "$cmd" = "jit" ]]; then
13-
cargo "+${TOOLCHAIN}" rustc $@ -- --jit
13+
cargo "+${TOOLCHAIN}" rustc "$@" -- --jit
1414
else
15-
cargo "+${TOOLCHAIN}" "$cmd" $@
15+
cargo "+${TOOLCHAIN}" "$cmd" "$@"
1616
fi

scripts/config.sh

100644100755
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
set -e
24

35
unamestr=$(uname)
@@ -39,7 +41,7 @@ echo
3941
export RUSTC_WRAPPER=
4042
fi
4143

42-
dir=$(cd $(dirname "$BASH_SOURCE"); pwd)
44+
dir=$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)
4345

4446
export RUSTC=$dir"/cg_clif"
4547
export RUSTFLAGS=$linker
@@ -51,7 +53,8 @@ if [[ $(uname) == 'Darwin' ]]; then
5153
export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
5254
fi
5355

54-
export LD_LIBRARY_PATH="$dir:$(rustc --print sysroot)/lib:$dir/target/out:$dir/sysroot/lib/rustlib/$TARGET_TRIPLE/lib"
56+
LD_LIBRARY_PATH="$dir:$(rustc --print sysroot)/lib:$dir/target/out:$dir/sysroot/lib/rustlib/$TARGET_TRIPLE/lib"
57+
export LD_LIBRARY_PATH
5558
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
5659

5760
export CG_CLIF_DISPLAY_CG_TIME=1

scripts/tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55
source build/config.sh
66
export CG_CLIF_INCR_CACHE_DISABLED=1
7-
MY_RUSTC=$RUSTC" "$RUSTFLAGS" -L crate=target/out --out-dir target/out -Cdebuginfo=2"
7+
MY_RUSTC="$RUSTC $RUSTFLAGS -L crate=target/out --out-dir target/out -Cdebuginfo=2"
88

99
function no_sysroot_tests() {
1010
echo "[BUILD] mini_core"

test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ set -e
33

44
export RUSTFLAGS="-Zrun_dsymutil=no"
55

6-
./build.sh --without-sysroot $@
6+
./build.sh --without-sysroot "$@"
77

88
rm -r target/out || true
99

1010
scripts/tests.sh no_sysroot
1111

12-
./build.sh $@
12+
./build.sh "$@"
1313

1414
scripts/tests.sh base_sysroot
1515
scripts/tests.sh extended_sysroot

0 commit comments

Comments
 (0)