summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliang yongxiang <[email protected]>2018-08-03 16:18:27 +0800
committerliang yongxiang <[email protected]>2018-08-03 16:18:27 +0800
commit09a844f7296b1d2cd319e1d0c126de8f6f472971 (patch)
treeb1281a7ed6744697e8ed92d471f5a193ff1bc633
parent12eafd541d39b2d8f8ab3ef31be06cdab1c5411b (diff)
[tools] The output directory of "scons --dist-strip" is changed from current-bsp/dist to current-bsp/dist-strip
-rw-r--r--tools/mkdist.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/mkdist.py b/tools/mkdist.py
index 78c2edc36a..beb01fecb1 100644
--- a/tools/mkdist.py
+++ b/tools/mkdist.py
@@ -142,10 +142,10 @@ def bs_update_ide_project(bsp_root, rtt_root):
if child.returncode == 0:
print('update %s project' % item)
-def zip_dist(bsp_root, dist_dir, dist_name):
+def zip_dist(dist_dir, dist_name):
import zipfile
- zip_filename = os.path.join(bsp_root, 'dist', dist_name)
+ zip_filename = os.path.join(dist_dir)
zip = zipfile.ZipFile(zip_filename + '.zip', 'w')
pre_len = len(os.path.dirname(dist_dir))
@@ -163,7 +163,7 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, Env):
print('make distribution and strip useless files....')
dist_name = os.path.basename(BSP_ROOT)
- dist_dir = os.path.join(BSP_ROOT, 'dist', dist_name)
+ dist_dir = os.path.join(BSP_ROOT, 'dist-strip', dist_name)
target_path = os.path.join(dist_dir, 'rt-thread')
print('=> %s' % os.path.basename(BSP_ROOT))
@@ -254,7 +254,7 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, Env):
bs_update_ide_project(dist_dir, target_path)
# make zip package
- zip_dist(BSP_ROOT, dist_dir, dist_name)
+ zip_dist(dist_dir, dist_name)
print('done!')
@@ -310,7 +310,7 @@ def MkDist(program, BSP_ROOT, RTT_ROOT, Env):
bs_update_ide_project(dist_dir, target_path)
# make zip package
- zip_dist(BSP_ROOT, dist_dir, dist_name)
+ zip_dist(dist_dir, dist_name)
print('done!')