File indexing completed on 2024-05-12 04:44:28

0001 #!/bin/bash -fxv
0002 # NOTE #!/bin/bash -fxv prints all executed commands.
0003 
0004 # SPDX-FileCopyrightText: Lukas Sommer <sommerluk@gmail.com>
0005 # SPDX-License-Identifier: BSD-2-Clause OR MIT
0006 
0007 
0008 
0009 
0010 
0011 # -e exits on error,
0012 # -u errors on undefined variables,
0013 # and -o (for option) pipefail exits on command pipe failures
0014 set -euo pipefail
0015 errorcount=0
0016 
0017 echo cmakelint started.
0018 cmakelint --spaces=4 `find -name "CMakeLists.txt"` > artifact_cmakelint.txt
0019 echo cmakelint finished.
0020 [ -s artifact_cmakelint.txt ] && ((errorcount++))
0021 
0022 echo Terminating continuous integration with exit code $errorcount.
0023 # NOTE The exit code of the last command is available with $? in the shell.
0024 exit $errorcount