mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
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:
committed by
Christian Decker
parent
9c3691340f
commit
5b7fcab766
@@ -1,8 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
diff -u <(egrep 'sudo apt-get install .*git' README.md) \
|
if ! diff -u <(grep -E 'sudo apt-get install .*git' README.md) \
|
||||||
<(egrep 'sudo apt-get install .*git' doc/INSTALL.md)
|
<(grep -E 'sudo apt-get install .*git' doc/INSTALL.md); then
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
echo "Dependencies listed in README.md are not identical to those listed in doc/INSTALL.md (see above). Please fix."
|
echo "Dependencies listed in README.md are not identical to those listed in doc/INSTALL.md (see above). Please fix."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/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 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
|
||||||
if [[ $? == 0 ]]; then
|
|
||||||
echo "Identified a likely misspelling of the word \"lightning\" (see above). Please fix."
|
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."
|
echo "Is this warning incorrect? Please teach tools/check-spelling.sh about the exciting new word."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ FILE="$1"
|
|||||||
BASE=/tmp/mocktmp.$$.$(echo "$@" | tr / _)
|
BASE=/tmp/mocktmp.$$.$(echo "$@" | tr / _)
|
||||||
trap 'mv $BASE.old $FILE; rm -f $BASE.*' EXIT
|
trap 'mv $BASE.old $FILE; rm -f $BASE.*' EXIT
|
||||||
|
|
||||||
START=$(fgrep -n '/* AUTOGENERATED MOCKS START */' "$FILE" | cut -d: -f1)
|
START=$(grep -F -n '/* AUTOGENERATED MOCKS START */' "$FILE" | cut -d: -f1)
|
||||||
END=$(fgrep -n '/* AUTOGENERATED MOCKS END */' "$FILE" | cut -d: -f1)
|
END=$(grep -F -n '/* AUTOGENERATED MOCKS END */' "$FILE" | cut -d: -f1)
|
||||||
|
|
||||||
if [ -n "$START" ]; then
|
if [ -n "$START" ]; then
|
||||||
mv "$FILE" "${BASE}.old"
|
mv "$FILE" "${BASE}.old"
|
||||||
@@ -21,7 +21,7 @@ if [ -n "$START" ]; then
|
|||||||
if ! make "${FILE/%.c/}" 2> "${BASE}.err" >/dev/null; then
|
if ! make "${FILE/%.c/}" 2> "${BASE}.err" >/dev/null; then
|
||||||
tools/mockup.sh < "${BASE}.err" >> "${BASE}.stubs"
|
tools/mockup.sh < "${BASE}.err" >> "${BASE}.stubs"
|
||||||
# If there are no link errors, maybe compile fail for other reason?
|
# 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"
|
cat "${BASE}.err"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user