COIN-OR::LEMON - Graph Library

Ticket #186: c5f010a5647a.patch

File c5f010a5647a.patch, 1.2 KB (added by Peter Kovacs, 11 years ago)
  • scripts/unify-sources.sh

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1228079196 -3600
    # 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 b  
    130130    echo $FAILED_FILES out of $TOTAL_FILES files has been failed.
    131131    echo $WARNED_FILES out of $TOTAL_FILES files triggered warnings.
    132132
    133     if [ $FAILED_FILES -gt 0 ]
    134     then
    135         return 1
    136     elif [ $WARNED_FILES -gt 0 ]
     133    if [ $WARNED_FILES -gt 0 -o $FAILED_FILES -gt 0 ]
    137134    then
    138135        if [ "$WARNING" == 'INTERACTIVE' ]
    139136        then
    140             echo -n "Are the files with warnings acceptable? (yes/no) "
     137            echo -n "Are the files with errors/warnings acceptable? (yes/no) "
    141138            while read answer
    142139            do
    143140                if [ "$answer" == 'yes' ]
     
    147144                then
    148145                    return 1
    149146                fi
    150                 echo -n "Are the files with warnings acceptable? (yes/no) "
     147                echo -n "Are the files with errors/warnings acceptable? (yes/no) "
    151148            done
    152149        elif [ "$WARNING" == 'WERROR' ]
    153150        then