tools: fix shellcheck errors.

Not sure how this got through Travis.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-04-05 14:41:19 +09:30 committed by Christian Decker
parent 9c3691340f
commit 5b7fcab766
3 changed files with 6 additions and 8 deletions

View File

@ -1,8 +1,7 @@
#!/bin/bash
diff -u <(egrep 'sudo apt-get install .*git' README.md) \
<(egrep 'sudo apt-get install .*git' doc/INSTALL.md)
if [[ $? != 0 ]]; then
if ! diff -u <(grep -E 'sudo apt-get install .*git' README.md) \
<(grep -E 'sudo apt-get install .*git' doc/INSTALL.md); then
echo "Dependencies listed in README.md are not identical to those listed in doc/INSTALL.md (see above). Please fix."
exit 1
fi

View File

@ -1,7 +1,6 @@
#!/bin/bash
git --no-pager grep -nHiE 'l[ightn]{6}g|l[ightn]{8}g|ilghtning|lgihtning|lihgtning|ligthning|lighnting|lightinng|lightnnig|lightnign' -- . ':!tools/check-spelling.sh'
if [[ $? == 0 ]]; then
if git --no-pager grep -nHiE 'l[ightn]{6}g|l[ightn]{8}g|ilghtning|lgihtning|lihgtning|ligthning|lighnting|lightinng|lightnnig|lightnign' -- . ':!tools/check-spelling.sh'; then
echo "Identified a likely misspelling of the word \"lightning\" (see above). Please fix."
echo "Is this warning incorrect? Please teach tools/check-spelling.sh about the exciting new word."
exit 1

View File

@ -9,8 +9,8 @@ FILE="$1"
BASE=/tmp/mocktmp.$$.$(echo "$@" | tr / _)
trap 'mv $BASE.old $FILE; rm -f $BASE.*' EXIT
START=$(fgrep -n '/* AUTOGENERATED MOCKS START */' "$FILE" | cut -d: -f1)
END=$(fgrep -n '/* AUTOGENERATED MOCKS END */' "$FILE" | cut -d: -f1)
START=$(grep -F -n '/* AUTOGENERATED MOCKS START */' "$FILE" | cut -d: -f1)
END=$(grep -F -n '/* AUTOGENERATED MOCKS END */' "$FILE" | cut -d: -f1)
if [ -n "$START" ]; then
mv "$FILE" "${BASE}.old"
@ -21,7 +21,7 @@ if [ -n "$START" ]; then
if ! make "${FILE/%.c/}" 2> "${BASE}.err" >/dev/null; then
tools/mockup.sh < "${BASE}.err" >> "${BASE}.stubs"
# If there are no link errors, maybe compile fail for other reason?
if ! fgrep -q 'Generated stub for' "${BASE}.stubs"; then
if ! grep -F -q 'Generated stub for' "${BASE}.stubs"; then
cat "${BASE}.err"
exit 1
fi