index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2020-05-11 00:16:30 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-06-01 10:59:08 +1000 |
commit | 3674144a74cfe897ec3ff46c18681df293290caa (patch) | |
tree | e0cc22ddc149a7fda84b7bbdc78e35f622119d34 /scripts/libmakepkg | |
parent | 454ea024383eab60295e4c4fdf2c329475887b2c (diff) |
-rw-r--r-- | scripts/libmakepkg/tidy/strip.sh.in | 11 |
diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in index 2b6f732d..868b96f3 100644 --- a/scripts/libmakepkg/tidy/strip.sh.in +++ b/scripts/libmakepkg/tidy/strip.sh.in @@ -56,11 +56,14 @@ strip_file() { fi # copy source files to debug directory - local f t + local file dest t while IFS= read -r t; do - f=${t/${dbgsrcdir}/"$srcdir"} - mkdir -p "${dbgsrc/"$dbgsrcdir"/}${t%/*}" - cp -- "$f" "${dbgsrc/"$dbgsrcdir"/}$t" + file=${t/${dbgsrcdir}/"$srcdir"} + dest="${dbgsrc/"$dbgsrcdir"/}$t" + if ! [[ -f $dest ]]; then + mkdir -p "${dest%/*}" + cp -- "$file" "$dest" + fi done < <(source_files "$binary") # copy debug symbols to debug directory |