# 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
|
|
36 | 36 | } |
37 | 37 | |
38 | 38 | function check_file() { |
39 | | echo 'check' $1 ... |
| 39 | echo ' check' $1 ... |
40 | 40 | |
41 | 41 | FILE_FAILED=NO |
42 | | if check_header $1 |
| 42 | |
| 43 | if [[ `echo $1 | grep -E 'Makefile\.am$' | wc -l` -eq 0 ]]; |
43 | 44 | 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 |
47 | 51 | fi |
48 | 52 | |
49 | 53 | if grep -q -E "$TAB" $1 |
… |
… |
|
98 | 102 | then |
99 | 103 | hg status --rev $HG_PARENT2:$HG_NODE -a -m |
100 | 104 | 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 |
102 | 106 | } |
103 | 107 | |
104 | 108 | if [ $# == 0 ]; then |
diff -r 246799fb45d4 -r 043f5a75c230 scripts/unify-sources.sh
a
|
b
|
|
72 | 72 | function update_file() { |
73 | 73 | echo -n ' update' $i ... |
74 | 74 | |
75 | | update_header $1 |
| 75 | if [[ `echo $1 | grep -E 'Makefile\.am$' | wc -l` -eq 0 ]]; |
| 76 | then |
| 77 | update_header $1 |
| 78 | fi |
76 | 79 | update_tabs $1 |
77 | 80 | remove_trailing_space $1 |
78 | 81 | |
… |
… |
|
106 | 109 | |
107 | 110 | function list_files() { |
108 | 111 | 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 |
110 | 113 | } |
111 | 114 | |
112 | 115 | CHANGED_FILES=0 |