File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -458,6 +458,24 @@ else
458458 echo " SKIP: RPC script not found at $RPC_SCRIPT "
459459fi
460460
461+ # ##############################################################################
462+ # SHELL SCRIPT SYNTAX #
463+ # ##############################################################################
464+
465+ printf " \n--- Shell script syntax ---\n"
466+ for shellscript in \
467+ root/etc/uci-defaults/* ; do
468+ [ -f " $shellscript " ] || continue
469+ head -1 " $shellscript " | grep -q ' ^#!/bin/sh' || continue
470+ name=" ${shellscript# root/ } "
471+ n_tests=$(( n_tests + 1 ))
472+ if sh -n " $shellscript " 2> /dev/null; then
473+ pass " sh -n $name "
474+ else
475+ fail " sh -n $name " " $( sh -n " $shellscript " 2>&1 ) "
476+ fi
477+ done
478+
461479# ##############################################################################
462480# SUMMARY #
463481# ##############################################################################
You can’t perform that action at this time.
0 commit comments