summaryrefslogtreecommitdiffstats
path: root/scripts/libmakepkg/tidy/strip.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/libmakepkg/tidy/strip.sh.in')
-rw-r--r--scripts/libmakepkg/tidy/strip.sh.in9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in
index 8a1d6096..e8f54be4 100644
--- a/scripts/libmakepkg/tidy/strip.sh.in
+++ b/scripts/libmakepkg/tidy/strip.sh.in
@@ -58,9 +58,9 @@ strip_file() {
# copy source files to debug directory
local f t
while read -r t; do
- f=${t/$dbgsrc/"$srcdir"}
- mkdir -p "${t%/*}"
- cp -- "$f" "$t"
+ f=${t/${dbgsrcdir}/"$srcdir"}
+ mkdir -p "${dbgsrc/"$dbgsrcdir"/}${t%/*}"
+ cp -- "$f" "${dbgsrc/"$dbgsrcdir"/}$t"
done < <(source_files "$binary")
# copy debug symbols to debug directory
@@ -104,7 +104,8 @@ tidy_strip() {
if check_option "debug" "y"; then
dbgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@/usr/lib/debug"
- dbgsrc="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@${DBGSRCDIR:-/usr/src/debug}"
+ dbgsrcdir="${DBGSRCDIR:-/usr/src/debug}"
+ dbgsrc="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@$dbgsrcdir"
mkdir -p "$dbgdir" "$dbgsrc"
fi