Build: Introduce shellcheck (#18081)
* Build: introduce shellcheck
Fixes #16198
(cherry picked from commit 4b16cd6cc8)
This commit is contained in:
committed by
Leonard Gram
parent
00519f1105
commit
fd7c38c62f
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
function exit_if_fail {
|
||||
# shellcheck disable=SC2124
|
||||
command=$@
|
||||
echo "Executing '$command'"
|
||||
eval "$command"
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
echo "'$command' returned $rc."
|
||||
exit $rc
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user