From 33fd2a801db8886297d313c71d8d74d8cdb87417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Tue, 9 Mar 2010 00:14:09 +0000 Subject: allow for for only stripping files without creating debug package contents by setting DISABLE_DEBUG environment variable. --- find-debuginfo.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'find-debuginfo.sh') diff --git a/find-debuginfo.sh b/find-debuginfo.sh index fec5d62..477f0e3 100755 --- a/find-debuginfo.sh +++ b/find-debuginfo.sh @@ -100,8 +100,8 @@ strip_to_debug() $strip_g && case "$(file -bi "$2")" in application/x-sharedlib*) g=-g ;; esac - eu-strip --remove-comment $g -f "$1" "$2" || exit - chmod 444 "$1" || exit + eu-strip --remove-comment $g $([ -n "$DISABLE_DEBUG" ] || echo -f "$1") "$2" || exit + [ -n "$DISABLE_DEBUG" ] || chmod 444 "$1" || exit } # Make a relative symlink to $1 called $3$2 @@ -194,6 +194,7 @@ xargs --no-run-if-empty stat -c '%h %D_%i %n' | while read nlinks inum f; do [[ -n "$EXCLUDE_REGEXP" ]] && grep -E -q "$EXCLUDE_REGEXP" <<< "$f" && \ continue + [ -n "$DISABLE_DEBUG" ] && strip_to_debug "" "$f" && continue get_debugfn "$f" [ -f "${debugfn}" ] && continue -- cgit v1.2.1