diff options
author | Karel Kočí <cynerd@email.cz> | 2015-03-23 10:34:38 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-03-23 10:34:38 +0100 |
commit | a00843349ff803bc6a9aca8424cdf9843178e12b (patch) | |
tree | d421dbc43a8286fb4da3d1a32bd2b14c07ca1dfa /scripts/reset.py | |
parent | 1f7a1ce514016640bc10f93ac01661994b14746a (diff) | |
download | linux-conf-perf-a00843349ff803bc6a9aca8424cdf9843178e12b.tar.gz linux-conf-perf-a00843349ff803bc6a9aca8424cdf9843178e12b.tar.bz2 linux-conf-perf-a00843349ff803bc6a9aca8424cdf9843178e12b.zip |
Reset functionality exported from main_loop
But not working yet
Diffstat (limited to 'scripts/reset.py')
-rwxr-xr-x | scripts/reset.py | 24 |
1 files changed, 24 insertions, 0 deletions
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() |