Menu

[9157ac]: / clean.py  Maximize  Restore  History

Download this file

30 lines (24 with data), 628 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python
import os
from onixos.proc import Proc
command = {
"clean": "sudo rm -rfv output/*",
}
debug = []
if __name__ == '__main__':
"""
This function is the main entry point of the script.
Args:
None
Returns:
None
"""
directory_path = os.getcwd()
log_dir = directory_path+"/logs"
if os.path.exists(log_dir) == False:
os.mkdir(log_dir)
debugProc = Proc("sudo rm -rf "+log_dir+"/*.log")
debug.append(debugProc.result())
debugProc = Proc(command["clean"])
debug.append(debugProc.result())
debugProc.appendLog(log_dir+"/clean.log")
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.