summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-09-13 14:11:37 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-09-16 16:27:04 +0200
commit2512fa5ae1d6ecdbdeb1805067a87652848f97be (patch)
treea23f82e0fad74f33de4ed042301a24dec5a2d444 /scripts
parent2071e277705be49925b45115fefeda52f89052b7 (diff)
downloadptxdist-2512fa5ae1d6ecdbdeb1805067a87652848f97be.tar.gz
ptxdist-2512fa5ae1d6ecdbdeb1805067a87652848f97be.tar.xz
ptxd_make_world_clean_sysroot: don't change the current directory
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_make_world_clean.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/lib/ptxd_make_world_clean.sh b/scripts/lib/ptxd_make_world_clean.sh
index 997422de0..d1b02b1aa 100644
--- a/scripts/lib/ptxd_make_world_clean.sh
+++ b/scripts/lib/ptxd_make_world_clean.sh
@@ -16,11 +16,10 @@ ptxd_make_world_clean_sysroot() {
if [ -d "${path}" ]; then
echo "Removing files from sysroot..."
echo
- cd "${path}" && find . ! -type d -print0 | \
- { cd "${pkg_sysroot_dir}" && xargs -0 rm -f; }
- cd "${path}" && find . -mindepth 1 -depth -type d -print0 | \
- { cd "${pkg_sysroot_dir}" && \
- xargs -0 rmdir --ignore-fail-on-non-empty 2> /dev/null; }
+ find "${path}/" ! -type d -printf "${pkg_sysroot_dir}/%P\0" | \
+ xargs -0 rm -f
+ find "${path}/" -mindepth 1 -depth -type d -printf "${pkg_sysroot_dir}/%P\0" | \
+ xargs -0 rmdir --ignore-fail-on-non-empty 2> /dev/null
fi
if [ -h "${link}" ]; then
rm "${link}"