diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2010-03-09 00:14:09 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2010-03-09 00:14:09 +0000 |
commit | 33fd2a801db8886297d313c71d8d74d8cdb87417 (patch) | |
tree | 257798ee40cfc7d5852c032bef3987dca0811413 /find-debuginfo.sh | |
parent | 8963393436c9651a2c5c2627530daf2fb67c756a (diff) | |
download | rpm-setup-33fd2a801db8886297d313c71d8d74d8cdb87417.tar rpm-setup-33fd2a801db8886297d313c71d8d74d8cdb87417.tar.gz rpm-setup-33fd2a801db8886297d313c71d8d74d8cdb87417.tar.bz2 rpm-setup-33fd2a801db8886297d313c71d8d74d8cdb87417.tar.xz rpm-setup-33fd2a801db8886297d313c71d8d74d8cdb87417.zip |
allow for for only stripping files without creating debug package contents by setting DISABLE_DEBUG environment variable.1.99
Diffstat (limited to 'find-debuginfo.sh')
-rwxr-xr-x | find-debuginfo.sh | 5 |
1 files changed, 3 insertions, 2 deletions
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 |