summaryrefslogtreecommitdiffstats
path: root/.ci/check-bashisms.sh
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-12-16 08:33:04 +0000
committerGerrit Code Review <gerrit@onap.org>2021-12-16 08:33:04 +0000
commit7ed8b00a6a0ff82a1e86702fe041f286a7fd089d (patch)
tree08a40278f751cd4d460677ebe5b80f12ddedd3b5 /.ci/check-bashisms.sh
parentb34b530918dc988ea3c37193dee2e7d4f76ba864 (diff)
parentd035a0a5fea7bf94cab1b1d6816c61febdfb8eb6 (diff)
Merge "[GLOBAL] Move to Gitlab"
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