Skip to content

Commit db2fac0

Browse files
committed
un-mangle pre_build.py
1 parent 452d54c commit db2fac0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.build/pre_build.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
import os
2+
import shutil
3+
4+
5+
def cd():
6+
os.chdir(os.path.realpath(os.path.join(os.path.dirname(__file__), '..')))
7+
8+
9+
def bundle_example_config():
10+
examples_dir = os.path.join('examples', 'config files - basic')
11+
files = [os.path.join(examples_dir, f) for f in os.listdir(examples_dir) if
12+
os.path.isfile(os.path.join(examples_dir, f))]
13+
bundle_dir = os.path.join('user_sync', 'resources', 'examples')
14+
if not os.path.exists(bundle_dir):
15+
os.mkdir(bundle_dir)
16+
for f in files:
17+
dest = os.path.join(bundle_dir, os.path.split(f)[-1])
18+
shutil.copy(f, dest)
19+
20+
121
if __name__ == '__main__':
222
cd()
323
bundle_example_config()

0 commit comments

Comments
 (0)