X-Git-Url: https://gerrit.onap.org/r/gitweb?p=oom.git;a=blobdiff_plain;f=.ci%2Fcheck-bashisms.sh;h=0915725baefb756e19b6bfa15fcf390b421f2b16;hp=0dae2255b79a252963ac9480d46cc32eec2ec1f4;hb=b777b35ab947214bc8502383b0e63f88f150c34b;hpb=d09f363e87c98d19ba2fccdf8f235d5cbfb908ee 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