From 599915e1d6247731e4575702b21c7c816739709d Mon Sep 17 00:00:00 2001 From: qua-non Date: Mon, 20 Jan 2014 03:41:47 +0530 Subject: [PATCH] implement the `clean` command. --- buildozer/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/buildozer/__init__.py b/buildozer/__init__.py index 47176cb..34a1e93 100644 --- a/buildozer/__init__.py +++ b/buildozer/__init__.py @@ -849,7 +849,14 @@ class Buildozer(object): def cmd_clean(self, *args): '''Clean the whole Buildozer environment. ''' - pass + import sys + print("Warning: Your ndk, sdk and all other cached packages will be"+\ + " removed. Continue? (y/n)") + if sys.stdin.readline().lower()[0] == 'y': + self.info('Clean the global build directory') + if not exists(self.global_buildozer_dir): + return + rmtree(self.global_buildozer_dir) def cmd_help(self, *args): '''Show the Buildozer help.