diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2013-09-13 07:38:01 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2013-09-29 11:24:31 +0200 |
commit | 333091b52dc994a1710765139d415da5610e9f4b (patch) | |
tree | 0a5ad0a1b3d944673dfc04e181347c79f4aee069 /scripts/lib/ptxd_make_xpkg_pkg.sh | |
parent | 4dffd07b1e626bd6ba5a03da973f3155da34a919 (diff) | |
download | ptxdist-333091b52dc994a1710765139d415da5610e9f4b.tar.gz ptxdist-333091b52dc994a1710765139d415da5610e9f4b.tar.xz |
ptxd_install_file_strip: move dir logic here
This will be needed later for separate debug files.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_xpkg_pkg.sh')
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_pkg.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh index 736fca044..f56392dbf 100644 --- a/scripts/lib/ptxd_make_xpkg_pkg.sh +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh @@ -214,7 +214,7 @@ export -f ptxd_install_dir # -# $@: files to strip +# $1: file to strip # # $strip: k for kernel modules # y for normal executables and libraries @@ -222,6 +222,7 @@ export -f ptxd_install_dir # ptxd_install_file_strip() { local -a strip_cmd + local dst="${1}" case "${strip:-y}" in k) strip_cmd=( "${CROSS_STRIP}" --strip-debug ) ;; @@ -234,12 +235,12 @@ ptxd_install_file_strip() { # local tmp="strip" local file - for file in "${@}"; do + for file in "${sdirs[@]/%/${dst}}"; do ln -f "${file}" "${file}.${tmp}" || return done && - "${strip_cmd[@]}" "${@}" && - rm -f "${@/%/.${tmp}}" + "${strip_cmd[@]}" "${sdirs[@]/%/${dst}}" && + rm -f "${sdirs[@]/%/${dst}.${tmp}}" } export -f ptxd_install_file_strip @@ -283,7 +284,7 @@ install ${cmd}: 0|n|no|N|NO) ;; y|k|"") if readelf -h "${src}" > /dev/null 2>&1; then - ptxd_install_file_strip "${sdirs[@]/%/${dst}}" + ptxd_install_file_strip "${dst}" fi ;; *) |