COIN-OR::LEMON - Graph Library

Changeset 341:d900fd1e760f in lemon for scripts


Ignore:
Timestamp:
10/20/08 12:46:39 (11 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Print the failed line numbers in the unifier script (ticket #138)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/unify-sources.sh

    r340 r341  
    8989    if ! diff -q $1 $2 >/dev/null
    9090    then
    91         echo -n " [$3 failed]"
     91        echo
     92        echo -n "      $3 failed at line(s): "
     93        echo -n $(diff $1 $2 | grep '^[0-9]' | sed "s/^\(.*\)c.*$/ \1/g" |
     94                  sed "s/,/-/g" | paste -s -d',')
    9295        FAILED=YES
    9396    fi
     
    9598
    9699function check_warning() {
    97     echo -n " [$2 warning]"
     100    echo
     101    if [ "$2" == 'long lines' ]
     102    then
     103        echo -n "      $2 warning at line(s): "
     104        echo -n $(grep -n -E '.{81,}' $1 | sed "s/^\([0-9]*\)/ \1\t/g" |
     105                  cut -f 1 | paste -s -d',')
     106    else
     107        echo -n "      $2 warning"
     108    fi
    98109    WARNED=YES
    99110}
Note: See TracChangeset for help on using the changeset viewer.