26
26
check_opinionated_shell () {
27
27
# The purpose of this function is to avoid casual introduction of more
29
29
# which uses bash specific features.
31
31
# Check that shell scripts are not bash opinionated (ignore comments though)
32
32
# If you cannot avoid the use of bash, please change the EXPECTED var below.
33
33
OBSERVED=$(grep -E '^([[:space:]]*[^#[:space:]]|#!).*bash' \
36
36
if [ ${EXPECTED} -ne ${OBSERVED} ]; then
37
37
echo "Bash usage has been detected!" >>$FAILURES