bootstrap: fix shellcheck warnings
Shellcheck reports issues in the [mostly] common bootstrap
script found in our autotools repositories. Apply fixes
for the issues reported by this tool:
- not handling filenames with spaces.
- not using portable `find` parameters.
- squash warning for purposeful string non-evaluation in
help-text.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I86ef079c9632e5563a1a56d6a2e23aad59ecbc57
diff --git a/bootstrap.sh b/bootstrap.sh
index 11c8ae9..faaf284 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -18,7 +18,7 @@
clean)
test -f Makefile && make maintainer-clean
for file in ${AUTOCONF_FILES}; do
- find -name "$file" | xargs -r rm -rf
+ find . -name "$file" -print0 | xargs -0 -r rm -rf
done
exit 0
;;
@@ -36,6 +36,7 @@
"$@"
;;
*)
+ # shellcheck disable=SC2016
echo 'Run "./configure ${CONFIGURE_FLAGS} && make"'
;;
esac