mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Check that user supplied the required argument; and if not, show usage().
Obtained from: OpenBSD
This commit is contained in:
parent
e7bd01e5df
commit
6db03527ff
1 changed files with 5 additions and 0 deletions
|
|
@ -37,6 +37,11 @@ OLDYACC="yyexca yyact yypact yypgo yyr1 yyr2 yychk yydef"
|
|||
NEWYACC="yylhs yylen yydefred yydgoto yysindex yyrindex yygindex \
|
||||
yytable yycheck"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "usage: $0 file [tables]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
file=$1
|
||||
>$file
|
||||
shift
|
||||
|
|
|
|||
Loading…
Reference in a new issue