summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorRoland Hieber <rhi@pengutronix.de>2019-05-22 12:18:28 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-05-24 11:03:04 +0200
commite3b5d696ff6fb6741e168a43f549b268da0d19e7 (patch)
tree6e588e3d7972ea5ac5ec49076541d9c28199eb75 /bin
parentcbbe3a70f4829d4c88f1570208a7db7b425587e1 (diff)
downloadptxdist-e3b5d696ff6fb6741e168a43f549b268da0d19e7.tar.gz
ptxdist-e3b5d696ff6fb6741e168a43f549b268da0d19e7.tar.xz
ptxdist: introduce the "clean target" subcommand
Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ptxdist16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 03d6a37ff..1a8e02192 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -967,6 +967,7 @@ Clean Actions:
clean cleanup build-host and build-cross dirs
clean root cleanup root directory for target
+ clean target cleanup all target packages
distclean cleanup everything
Misc:
@@ -1041,6 +1042,21 @@ EOF
clean() {
local dir bdir
+ # we want to clean all target packages
+ if [ "${1}" = "target" ]; then
+ if [ ! -n "${PTXDIST_FORCE}${PTXDIST_QUIET}${PTXCONF_SETUP_DIRECT_CLEAN}" ]; then
+ read -e -p "really clean all target packages? [y/N] " r
+ case "${r}" in
+ y|Y) ;;
+ *) exit 1 ;;
+ esac
+ fi
+ check_premake_compiler &&
+ pkgs=($(ptxd_make "/print-PACKAGES /print-EXTRA_PACKAGES /print-LAZY_PACKAGES")) &&
+ ptxd_make_log "${pkgs[@]/%/_clean}"
+ set -- root
+ fi
+
# we want to clean the root dir
if [ "${1}" = "root" ]; then
echo