COIN-OR::LEMON - Graph Library

Ticket #138: 043f5a75c230.patch

File 043f5a75c230.patch, 1.8 KB (added by Peter Kovacs, 16 years ago)

also check Makefile.am files

  • scripts/check-sources.sh

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1221514891 -7200
    # Node ID 043f5a75c23066a15baf29aabff444e4b94a5dd2
    # Parent  246799fb45d4959f3392b248e5356466fd34a281
    The scripts also check Makefile.am files (ticket #138)
    
    diff -r 246799fb45d4 -r 043f5a75c230 scripts/check-sources.sh
    a b  
    3636}
    3737
    3838function check_file() {
    39     echo 'check' $1 ...
     39    echo '    check' $1 ...
    4040
    4141    FILE_FAILED=NO
    42     if check_header $1
     42   
     43    if [[ `echo $1 | grep -E 'Makefile\.am$' | wc -l` -eq 0 ]];
    4344    then
    44         echo "header failed"
    45         FILE_FAILED=YES
    46         GLOBAL_FAILED=YES
     45        if check_header $1
     46        then
     47            echo "header failed"
     48            FILE_FAILED=YES
     49            GLOBAL_FAILED=YES
     50        fi
    4751    fi
    4852
    4953    if grep -q -E "$TAB" $1
     
    98102        then
    99103            hg status --rev $HG_PARENT2:$HG_NODE -a -m
    100104        fi
    101     } | cut -d ' ' -f 2 | grep -E  '\.(cc|h|dox)$' | sort | uniq
     105    } | cut -d ' ' -f 2 | grep -E '(\.(cc|h|dox)$|Makefile\.am$)' | sort | uniq
    102106}
    103107
    104108if [ $# == 0 ]; then
  • scripts/unify-sources.sh

    diff -r 246799fb45d4 -r 043f5a75c230 scripts/unify-sources.sh
    a b  
    7272function update_file() {
    7373    echo -n '    update' $i ...
    7474
    75     update_header $1
     75    if [[ `echo $1 | grep -E 'Makefile\.am$' | wc -l` -eq 0 ]];
     76    then
     77        update_header $1
     78    fi
    7679    update_tabs $1
    7780    remove_trailing_space $1
    7881
     
    106109
    107110function list_files() {
    108111    hg status -a -m -c |
    109     cut -d ' ' -f 2 | grep -E  '\.(cc|h|dox)$' | sort | uniq
     112    cut -d ' ' -f 2 | grep -E  '(\.(cc|h|dox)$|Makefile\.am$)' | sort | uniq
    110113}
    111114
    112115CHANGED_FILES=0