File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -611,6 +611,26 @@ load_package_config
611611assert_eq " load_package_config: canary disabled → canaryDomains empty" " " " $canaryDomains "
612612assert_eq " load_package_config: force_dns=0 → unset" " " " $force_dns "
613613
614+ # ##############################################################################
615+ # SHELL SCRIPT SYNTAX #
616+ # ##############################################################################
617+
618+ printf " \n--- Shell script syntax ---\n"
619+ for shellscript in \
620+ files/etc/init.d/* \
621+ files/etc/uci-defaults/* ; do
622+ [ -f " $shellscript " ] || continue
623+ head -1 " $shellscript " | grep -q ' ^#!/bin/sh' || continue
624+ name=" ${shellscript# files/ } "
625+ n_tests=$(( n_tests + 1 ))
626+ if sh -n " $shellscript " 2> /dev/null; then
627+ pass " sh -n $name "
628+ else
629+ fail " sh -n $name " " syntax ok" " syntax error"
630+ sh -n " $shellscript "
631+ fi
632+ done
633+
614634# ##############################################################################
615635# SUMMARY #
616636# ##############################################################################
You can’t perform that action at this time.
0 commit comments