... | ... |
@@ -134,7 +134,7 @@ function trap_exit () { |
134 | 134 |
fi |
135 | 135 |
done |
136 | 136 |
|
137 |
- if test -r "$database" && md5sum $in_ram_database | sed "s,$in_ram_database,$database," | md5sum --status -c -; then |
|
137 |
+ if test -r "$database" && sqldiff=$(sqldiff $in_ram_database $database) && test -z "$sqldiff"; then |
|
138 | 138 |
echo "no changes in $database" |
139 | 139 |
elif test -w "$database"; then |
140 | 140 |
rm -f "$database" |
... | ... |
@@ -97,7 +97,7 @@ if [[ $nouveau = @(check|prox|leven) ]]; then |
97 | 97 |
echo "caractère manquant (del=): $cost_del" |
98 | 98 |
echo "caractère inséré (ins=): $cost_ins" |
99 | 99 |
echo "caractère remplacé (rep=): $cost_rep" |
100 |
- echo "distance maximale (max=): ${cost_max:-$(($cost_ins + $cost_del + $cost_rep))}" |
|
100 |
+ echo "distance maximale (max=): $cost_max" |
|
101 | 101 |
for f in $(find . -type f); do |
102 | 102 |
let wc+=$(wc -w < $f) |
103 | 103 |
done |