From 1a0e293e20f8f0d3d3e87d0da6cecc92ef5d4813 Mon Sep 17 00:00:00 2001 From: David MacKenzie Date: Sun, 18 Sep 1994 03:32:50 +0000 Subject: [PATCH] protec for with if --- autoheader.in | 18 ++++++++++-------- autoheader.sh | 18 ++++++++++-------- bin/autoheader.in | 18 ++++++++++-------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/autoheader.in b/autoheader.in index c4040f96..354d4d09 100644 --- a/autoheader.in +++ b/autoheader.in @@ -224,14 +224,16 @@ test -f ${config_h}.bot && cat ${config_h}.bot status=0 -for sym in $syms; do - if fgrep $sym $TEMPLATES >/dev/null; then - : # All is well. - else - echo "$0: Symbol \`${sym}' is not covered by $TEMPLATES" >&2 - status=1 - fi -done +if test -n "$syms"; then + for sym in $syms; do + if fgrep $sym $TEMPLATES >/dev/null; then + : # All is well. + else + echo "$0: Symbol \`${sym}' is not covered by $TEMPLATES" >&2 + status=1 + fi + done +fi if test $# -eq 0; then if test $status -eq 0; then diff --git a/autoheader.sh b/autoheader.sh index c4040f96..354d4d09 100644 --- a/autoheader.sh +++ b/autoheader.sh @@ -224,14 +224,16 @@ test -f ${config_h}.bot && cat ${config_h}.bot status=0 -for sym in $syms; do - if fgrep $sym $TEMPLATES >/dev/null; then - : # All is well. - else - echo "$0: Symbol \`${sym}' is not covered by $TEMPLATES" >&2 - status=1 - fi -done +if test -n "$syms"; then + for sym in $syms; do + if fgrep $sym $TEMPLATES >/dev/null; then + : # All is well. + else + echo "$0: Symbol \`${sym}' is not covered by $TEMPLATES" >&2 + status=1 + fi + done +fi if test $# -eq 0; then if test $status -eq 0; then diff --git a/bin/autoheader.in b/bin/autoheader.in index c4040f96..354d4d09 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -224,14 +224,16 @@ test -f ${config_h}.bot && cat ${config_h}.bot status=0 -for sym in $syms; do - if fgrep $sym $TEMPLATES >/dev/null; then - : # All is well. - else - echo "$0: Symbol \`${sym}' is not covered by $TEMPLATES" >&2 - status=1 - fi -done +if test -n "$syms"; then + for sym in $syms; do + if fgrep $sym $TEMPLATES >/dev/null; then + : # All is well. + else + echo "$0: Symbol \`${sym}' is not covered by $TEMPLATES" >&2 + status=1 + fi + done +fi if test $# -eq 0; then if test $status -eq 0; then