#!/bin/sh
set -e
set -x
-echo Testing $(git log -1 --oneline)
+echo "Testing $(git log -1 --oneline)"
cargo check
cargo doc
cargo doc --document-private-items
echo "It seems like the current checked-out commit is not based on $1"
exit 1
fi
-git rebase --exec ci/check-compiles.sh $1
+git rebase --exec ci/check-compiles.sh "$1"
# Run fmt
TMP_FILE=$(mktemp)
-find . -name '*.rs' -type f |sort >$TMP_FILE
-for file in $(comm -23 $TMP_FILE rustfmt_excluded_files); do
+find . -name '*.rs' -type f |sort >"$TMP_FILE"
+for file in $(comm -23 "$TMP_FILE" rustfmt_excluded_files); do
echo "Checking formatting of $file"
- rustfmt $VERS --edition 2021 --check $file
+ rustfmt $VERS --edition 2021 --check "$file"
done
BITCOIND_DL_FILE_NAME=bitcoin-"$BITCOIND_VERSION"-x86_64-apple-darwin.tar.gz
BITCOIND_DL_HASH="1acfde0ec3128381b83e3e5f54d1c7907871d324549129592144dd12a821eff1"
else
- echo "\n\nUnsupported platform: $HOST_PLATFORM Exiting.."
+ printf "\n\n"
+ echo "Unsupported platform: $HOST_PLATFORM Exiting.."
exit 1
fi
# Run fmt
TMP_FILE=$(mktemp)
-find . -name '*.rs' -type f |sort >$TMP_FILE
-for file in $(comm -23 $TMP_FILE rustfmt_excluded_files); do
+find . -name '*.rs' -type f |sort >"$TMP_FILE"
+for file in $(comm -23 "$TMP_FILE" rustfmt_excluded_files); do
echo "Formatting $file..."
- rustfmt $VERS --edition 2021 $file
+ rustfmt $VERS --edition 2021 "$file"
done