windows: Do not make test in kadmin/
[heimdal.git] / tools / fixgcov-source-paths.sh
blobeaa9c9c62adad064bd7fe44311df44d31c43ccc2
1 #!/bin/sh
3 find ${1:-.} -name '*.gcov' -print | while read f; do
4 case "$f" in
5 */.libs/*) continue;;
6 *) true;;
7 esac
8 echo FIX $f
9 f_basename=${f%%.gcno\#\#*}.c
10 f_basename=${f_basename##*/}
11 head -1 "$f" | grep 'Source:/' > /dev/null && continue
12 #bname=$(head -1 "$f" | grep 'Source:/' | cut -d: -f4)
13 dname=$(echo "$f"|cut -d'#' -f1|sed -e 's,/[^/]*$,/,')
14 ex "$f" <<EOF
15 1,1 s,:Source:.*$,:Source:${dname}${f_basename},
16 wq!
17 EOF
18 done