implement the clean command.

This commit is contained in:
qua-non 2014-01-20 03:41:47 +05:30
parent f04a56a720
commit 599915e1d6

View file

@ -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.