summaryrefslogtreecommitdiffstats
path: root/scripts/lib/ptxd_make_world_clean.sh
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2010-10-08 19:43:21 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2010-10-11 15:09:28 +0200
commit03872e23750553b1753e30fd3c98ae21dfb0f7e4 (patch)
tree157b753209a1d1a34f583a26c60967396b7c4fe8 /scripts/lib/ptxd_make_world_clean.sh
parent17062e46c57142b9b4d673d72e51ab24827dc9d9 (diff)
downloadptxdist-03872e23750553b1753e30fd3c98ae21dfb0f7e4.tar.gz
ptxdist-03872e23750553b1753e30fd3c98ae21dfb0f7e4.tar.xz
[clean] improve clean stage
* remove files from sysroot during 'ptxdist clean <pkg>' * remove stage files for ipkgs Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_world_clean.sh')
-rw-r--r--scripts/lib/ptxd_make_world_clean.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_world_clean.sh b/scripts/lib/ptxd_make_world_clean.sh
index 87b7ab994..b2a77e560 100644
--- a/scripts/lib/ptxd_make_world_clean.sh
+++ b/scripts/lib/ptxd_make_world_clean.sh
@@ -23,7 +23,11 @@ ptxd_make_world_clean() {
fi
if [ -n "$(ls "${ptx_state_dir}/${pkg_label}".* 2> /dev/null)" ]; then
echo "Deleting stage files:"
- ls "${ptx_state_dir}/${pkg_label}".*
+ for name in $(cat "${pkg_xpkg_map}" 2>/dev/null); do
+ ls "${ptx_state_dir}/${name}".*
+ rm -f "${ptx_state_dir}/${name}".*
+ done
+ ls "${ptx_state_dir}/${pkg_label}".* 2>/dev/null
rm -f "${ptx_state_dir}/${pkg_label}".*
echo
fi
@@ -40,6 +44,11 @@ ptxd_make_world_clean() {
echo
fi
if [ -d "${pkg_pkg_dir}" ]; then
+ echo "Removing files from sysroot..."
+ echo
+ find "${pkg_pkg_dir}" ! -type d | while read file; do
+ rm -f "${pkg_sysroot_dir}/${file##${pkg_pkg_dir}}"
+ done
echo "Deleting pkg dir:"
echo "${pkg_pkg_dir}"
rm -rf "${pkg_pkg_dir}"