Skip to content

Commit 16cd4d9

Browse files
committed
Fix misc shellcheck complaints
1 parent 7f1dd84 commit 16cd4d9

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

ci/check-compiles.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
set -e
33
set -x
4-
echo Testing $(git log -1 --oneline)
4+
echo "Testing $(git log -1 --oneline)"
55
cargo check
66
cargo doc
77
cargo doc --document-private-items

ci/check-each-commit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ if [ "$(git log --pretty="%H %D" | grep "^[0-9a-f]*.* $1")" = "" ]; then
1212
echo "It seems like the current checked-out commit is not based on $1"
1313
exit 1
1414
fi
15-
git rebase --exec ci/check-compiles.sh $1
15+
git rebase --exec ci/check-compiles.sh "$1"

ci/rustfmt.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ VERS=""
1414

1515
# Run fmt
1616
TMP_FILE=$(mktemp)
17-
find . -name '*.rs' -type f |sort >$TMP_FILE
18-
for file in $(comm -23 $TMP_FILE rustfmt_excluded_files); do
17+
find . -name '*.rs' -type f |sort >"$TMP_FILE"
18+
for file in $(comm -23 "$TMP_FILE" rustfmt_excluded_files); do
1919
echo "Checking formatting of $file"
20-
rustfmt $VERS --edition 2021 --check $file
20+
rustfmt $VERS --edition 2021 --check "$file"
2121
done

contrib/download_bitcoind_electrs.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ elif [[ "$HOST_PLATFORM" == *darwin* ]]; then
2222
BITCOIND_DL_FILE_NAME=bitcoin-"$BITCOIND_VERSION"-x86_64-apple-darwin.tar.gz
2323
BITCOIND_DL_HASH="1acfde0ec3128381b83e3e5f54d1c7907871d324549129592144dd12a821eff1"
2424
else
25-
echo "\n\nUnsupported platform: $HOST_PLATFORM Exiting.."
25+
printf "\n\n"
26+
echo "Unsupported platform: $HOST_PLATFORM Exiting.."
2627
exit 1
2728
fi
2829

contrib/run-rustfmt.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ VERS=""
1414

1515
# Run fmt
1616
TMP_FILE=$(mktemp)
17-
find . -name '*.rs' -type f |sort >$TMP_FILE
18-
for file in $(comm -23 $TMP_FILE rustfmt_excluded_files); do
17+
find . -name '*.rs' -type f |sort >"$TMP_FILE"
18+
for file in $(comm -23 "$TMP_FILE" rustfmt_excluded_files); do
1919
echo "Formatting $file..."
20-
rustfmt $VERS --edition 2021 $file
20+
rustfmt $VERS --edition 2021 "$file"
2121
done

0 commit comments

Comments
 (0)