From 597e4234d0ef8e1a7335a6e2b35cb8cced0d7207 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 12 Aug 2005 09:20:32 +0000 Subject: r9258: return is only supported in function, not in plain shell scripts metze (This used to be commit 3b99c3685734e398ab007e93dd7f468027c1847f) --- source4/script/lex_compile.sh | 12 ++++++------ source4/script/yacc_compile.sh | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source4/script/lex_compile.sh b/source4/script/lex_compile.sh index 7af9ea1281..09f8253af7 100755 --- a/source4/script/lex_compile.sh +++ b/source4/script/lex_compile.sh @@ -9,16 +9,16 @@ file=`basename $SRC` base=`basename $SRC .l` if [ -z "$LEX" ]; then echo "lex not found - not regenerating $DEST" - return; + exit; fi if [ -r $DEST ]; then - if [ x`find $SRC -newer $DEST -print` != x$SRC ]; then - return; - fi + if [ x`find $SRC -newer $DEST -print` != x$SRC ]; then + exit; + fi fi TOP=`pwd` if cd $dir && $LEX $file; then - sed '/^#/ s|$base.yy\.c|$DEST|' $base.yy.c > $base.c - rm -f $base.yy.c + sed '/^#/ s|$base.yy\.c|$DEST|' $base.yy.c > $base.c + rm -f $base.yy.c fi cd $TOP diff --git a/source4/script/yacc_compile.sh b/source4/script/yacc_compile.sh index 46a6fb6455..4c87b7c4b7 100755 --- a/source4/script/yacc_compile.sh +++ b/source4/script/yacc_compile.sh @@ -9,12 +9,12 @@ file=`basename $SRC` base=`basename $SRC .y` if [ -z "$YACC" ]; then echo "yacc not found" - return; + exit; fi if [ -r $DEST ]; then if [ x`find $SRC -newer $DEST -print` != x$SRC ]; then - return; - fi + exit; + fi fi TOP=`pwd` if cd $dir && $YACC -d $file; then -- cgit