# HG changeset patch # User Peter Kovacs # Date 2008-11-30 22:06:36 # Node ID c5f010a5647a60db355859c47befaa6716479c08 # Parent 0c5dd7ceda033c6e2292d1c220c15b38291476fd 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). diff --git a/scripts/unify-sources.sh b/scripts/unify-sources.sh --- a/scripts/unify-sources.sh +++ b/scripts/unify-sources.sh @@ -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