From a00843349ff803bc6a9aca8424cdf9843178e12b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 23 Mar 2015 10:34:38 +0100 Subject: Reset functionality exported from main_loop But not working yet --- scripts/reset.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scripts/reset.py (limited to 'scripts/reset.py') diff --git a/scripts/reset.py b/scripts/reset.py new file mode 100755 index 0000000..461bbda --- /dev/null +++ b/scripts/reset.py @@ -0,0 +1,24 @@ +#!/bin/python3 +import os +import sys + +def rm_rf(d): + for path in (os.path.join(d,f) for f in os.listdir(d)): + if os.path.isdir(path): + rm_rf(path) + else: + os.unlink(path) + os.rmdir(d) + +# TODO repair, broken +def reset(): + rm_rf(conf.build_folder) + os.chdir(conf.linux_sources) + subprocess.call(['make','clean']) + os.rm('.config') # remove linux config file + + +################################################################################# + +if __name__ == '__main__': + reset() -- cgit v1.2.3