From 4f5791ebd03eaec1c7da0865a383175b05102712 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 19:47:29 +0200 Subject: Adding upstream version 2:4.17.12+dfsg. Signed-off-by: Daniel Baumann --- third_party/heimdal/tools/fixgcov-source-paths.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 third_party/heimdal/tools/fixgcov-source-paths.sh (limited to 'third_party/heimdal/tools/fixgcov-source-paths.sh') diff --git a/third_party/heimdal/tools/fixgcov-source-paths.sh b/third_party/heimdal/tools/fixgcov-source-paths.sh new file mode 100755 index 0000000..eaa9c9c --- /dev/null +++ b/third_party/heimdal/tools/fixgcov-source-paths.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +find ${1:-.} -name '*.gcov' -print | while read f; do + case "$f" in + */.libs/*) continue;; + *) true;; + esac + echo FIX $f + f_basename=${f%%.gcno\#\#*}.c + f_basename=${f_basename##*/} + head -1 "$f" | grep 'Source:/' > /dev/null && continue + #bname=$(head -1 "$f" | grep 'Source:/' | cut -d: -f4) + dname=$(echo "$f"|cut -d'#' -f1|sed -e 's,/[^/]*$,/,') + ex "$f" <