-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.py
More file actions
29 lines (25 loc) · 844 Bytes
/
Copy pathbuild.py
File metadata and controls
29 lines (25 loc) · 844 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
import os
from shutil import copytree, ignore_patterns
def clear(filepath):
files = os.listdir(filepath)
for fd in files:
cur_path = os.path.join(filepath, fd)
if os.path.isdir(cur_path):
if fd == "__pycache__":
print("rm %s -rf" % cur_path)
os.system("rm %s -rf" % cur_path)
else:
clear(cur_path)
def package():
path = "./output/CrealityCloudIntegration"
# isExists = os.path.exists(path)
# if not isExists:
# os.makedirs(path)
copytree("./", path+"/",
ignore=ignore_patterns('*.github', '*.txt', '*.jsc', '*.qmlc', '*.gitignore', '*.git', "build.py"))
if __name__ == "__main__":
os.system("rm -rf *.jsc")
os.system("rm -rf *.qmlc")
os.system("rm -rf output")
clear("./")
package()