[Lemon-commits] Peter Kovacs: Improve unify-sources.sh (#186)

Lemon HG hg at lemon.cs.elte.hu
Mon Dec 1 12:45:11 CET 2008


details:   http://lemon.cs.elte.hu/hg/lemon/rev/c5f010a5647a
changeset: 411:c5f010a5647a
user:      Peter Kovacs <kpeter [at] inf.elte.hu>
date:      Sun Nov 30 22:06:36 2008 +0100
description:
	Improve unify-sources.sh (#186) Errors can also be accepted when the
	script is used as a hg hook. Sometimes it is useful (e.g. if someone
	else made the errors).

diffstat:

1 file changed, 3 insertions(+), 6 deletions(-)
scripts/unify-sources.sh |    9 +++------

diffs (29 lines):

diff -r 0c5dd7ceda03 -r c5f010a5647a scripts/unify-sources.sh
--- a/scripts/unify-sources.sh	Sun Nov 30 09:39:34 2008 +0000
+++ b/scripts/unify-sources.sh	Sun Nov 30 22:06:36 2008 +0100
@@ -130,14 +130,11 @@
     echo $FAILED_FILES out of $TOTAL_FILES files has been failed.
     echo $WARNED_FILES out of $TOTAL_FILES files triggered warnings.
 
-    if [ $FAILED_FILES -gt 0 ]
-    then
-	return 1
-    elif [ $WARNED_FILES -gt 0 ]
+    if [ $WARNED_FILES -gt 0 -o $FAILED_FILES -gt 0 ]
     then
 	if [ "$WARNING" == 'INTERACTIVE' ]
 	then
-	    echo -n "Are the files with warnings acceptable? (yes/no) "
+	    echo -n "Are the files with errors/warnings acceptable? (yes/no) "
 	    while read answer
 	    do
 		if [ "$answer" == 'yes' ]
@@ -147,7 +144,7 @@
 		then
 		    return 1
 		fi
-		echo -n "Are the files with warnings acceptable? (yes/no) "
+		echo -n "Are the files with errors/warnings acceptable? (yes/no) "
 	    done
 	elif [ "$WARNING" == 'WERROR' ]
 	then



More information about the Lemon-commits mailing list