From 9d871ba6dc70d493f528890648f671b872bbd88e Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 4 Mar 2018 18:59:14 +0200 Subject: [PATCH] build.sh: clean-target: also clean host and staging --- build.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 931588d9ed..c5a0190b0a 100755 --- a/build.sh +++ b/build.sh @@ -62,14 +62,23 @@ elif [ "$target" == "mkrelease" ]; then echo "your gz image is ready at $basedir/$osname-$board-$osversion.img.gz" elif [ "$target" == "clean-target" ]; then + if [ -d $outputdir/target ]; then + echo "removing target directory" + rm -rf $outputdir/target/* + + echo "removing staging directory" + rm -rf $outputdir/staging/* + fi + if [ -d $outputdir/build ]; then echo "removing .stamp_target_installed files" find $outputdir/build -name .stamp_target_installed | xargs -r rm - fi - if [ -d $outputdir/target ]; then - echo "removing target directory" - rm -rf $outputdir/target + echo "removing .stamp_staging_installed files" + find $outputdir/build -name .stamp_staging_installed | xargs -r rm + + echo "removing .stamp_host_installed files" + find $outputdir/build -name .stamp_host_installed | xargs -r rm fi echo "target is clean"