1#!/usr/bin/env python3
2
3import os
4import sys
5import getpass
6import shutil
7
8#!/usr/bin/env python3
9
10import os
11import sys
12import getpass
13import shutil
14
15comp_path = sys.path[0]
16print("comp_path:")
17print(comp_path)
18
19# original folder
20src_mp3_path = comp_path + "/resources/mp3"
21
22# new folder
23data_path = comp_path + "/../../hardware/chip/haas1000/prebuild/data"
24mp3_dst_path = data_path + "/mp3"
25
26# delete prebuild/data resources
27if os.path.exists(mp3_dst_path):
28    print ('Delete /data/mp3 firstly')
29    shutil.rmtree(mp3_dst_path)
30
31# copy resources
32shutil.copytree(src_mp3_path, mp3_dst_path)
33
34# result
35print("run external script success")
36