diff options
author | obrien <obrien@FreeBSD.org> | 1999-07-29 09:47:33 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-07-29 09:47:33 +0000 |
commit | b10abbc3c0dc774658140663a50f71d22871396d (patch) | |
tree | e7f50f8dfbeb2a22e3298eba13d5a6a74b6dd7eb /usr.bin/yacc | |
parent | ecc95f8e7b45432bee66e7ceadb43a1ad6679cec (diff) | |
download | FreeBSD-src-b10abbc3c0dc774658140663a50f71d22871396d.zip FreeBSD-src-b10abbc3c0dc774658140663a50f71d22871396d.tar.gz |
Check that user supplied the required argument; and if not, show usage().
Obtained from: OpenBSD
Diffstat (limited to 'usr.bin/yacc')
-rw-r--r-- | usr.bin/yacc/yyfix.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/yacc/yyfix.sh b/usr.bin/yacc/yyfix.sh index 29085f9..d983df6 100644 --- a/usr.bin/yacc/yyfix.sh +++ b/usr.bin/yacc/yyfix.sh @@ -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 |