summaryrefslogtreecommitdiffstats
path: root/.ci/check-bashisms.sh
diff options
context:
space:
mode:
Diffstat (limited to '.ci/check-bashisms.sh')
-rwxr-xr-x.ci/check-bashisms.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/.ci/check-bashisms.sh b/.ci/check-bashisms.sh
index 0dae2255b7..0915725bae 100755
--- a/.ci/check-bashisms.sh
+++ b/.ci/check-bashisms.sh
@@ -14,14 +14,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+set -eu
+
if ! which checkbashisms >/dev/null && ! sudo yum install devscripts-minimal && ! sudo apt-get install devscripts
then
printf "checkbashisms command not found - please install it \n\
(e.g. sudo apt-get install devscripts | yum install devscripts-minimal )\n" >&2
exit 2
fi
+
find . -not -path '*/.*' -name '*.sh' -exec checkbashisms {} + || exit 3
find . -not -path '*/.*' -name '*.failover' -exec checkbashisms -f \{\} + || exit 4
! find . -not -path '*/.*' -name '*.sh' -exec grep 'local .*=' {} + || exit 5
! find . -not -path '*/.*' -name '*.failover' -exec grep 'local .*=' {} + || exit 6
+
exit 0