26 lines
628 B
Python
Executable File
26 lines
628 B
Python
Executable File
#!/usr/bin/python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
import os
|
|
import sys
|
|
import time
|
|
import shutil
|
|
|
|
if __name__ == "__main__":
|
|
time_start=time.time()
|
|
if(len(sys.argv)>2):
|
|
cmd=f"{' '.join(sys.argv[1:])} > build_log.log"
|
|
if not ('not_clean' in sys.argv[1:]):
|
|
os.system("python3 ../clear_output.py > /dev/null")
|
|
path="../tools/gen_img/customer"
|
|
if os.path.exists(path):
|
|
shutil.rmtree(path)
|
|
else:
|
|
cmd=' '.join(sys.argv[1:])
|
|
print(cmd)
|
|
os.system(cmd)
|
|
time_end=time.time()
|
|
print(f"build end, cost {time_end-time_start} s")
|
|
print(time.asctime())
|