Skip to content

Commit dd7bf2a

Browse files
committed
【完善】:env 提示信息
1 parent 5d9d3a5 commit dd7bf2a

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

cmds/cmd_menuconfig.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,15 +239,10 @@ def cmd(args):
239239
if not os.path.isfile(fn):
240240
return
241241

242-
print("\nTry the command <menuconfig -s/--setting> ")
243-
print(
244-
"\nEnable the auto update option, env will auto update the packages you select.")
245242

246243
if find_macro_in_config(fn, 'SYS_AUTO_UPDATE_PKGS'):
247244
os.system('pkgs --update')
248-
print "Auto package update ends."
249-
250-
print("If you want to automatically generate a new MDK/IAR project, \nyou can select the type of project you need in the <menuconfig -s> option.")
245+
print "==============================>The packages have been updated completely."
251246

252247
if find_macro_in_config(fn, 'SYS_CREATE_MDK_IAR_PROJECT'):
253248
if find_macro_in_config(fn, 'SYS_CREATE_MDK4'):

cmds/cmd_package.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,10 @@ def modify_submod_file_to_mirror(submod_path):
121121
try:
122122
with open(submod_path, 'r') as f:
123123
for line in f:
124-
line = line.replace('\t', '').replace(
125-
' ', '').replace('\n', '').replace('\r', '')
124+
line = line.replace('\t', '').replace(' ', '').replace('\n', '').replace('\r', '')
126125
if line.startswith('url'):
127126
submod_git_url = line.split('=')[1]
128-
submodule_name = submod_git_url.split(
129-
'/')[-1].replace('.git', '')
127+
submodule_name = submod_git_url.split('/')[-1].replace('.git', '')
130128
replace_url = get_mirror_giturl(submodule_name)
131129
# print(replace_url)
132130
query_submodule_name = 'submod_' + submodule_name
@@ -197,7 +195,9 @@ def get_url_from_mirror_server(pkgs_name_in_json, pkgs_ver):
197195
return download_url, repo_sha
198196
return download_url, None
199197

200-
print("\nTips : \nThe system needs to be upgraded. \nPlease use the <pkgs --upgrade> command to upgrade packages index.\n")
198+
print("\nTips : \nThe system needs to be upgraded.")
199+
print("Please use the <pkgs --upgrade> command to upgrade packages index.\n")
200+
201201
return None, None
202202

203203
except Exception, e:
@@ -345,8 +345,8 @@ def package_list():
345345
# pkgs_fn = os.path.join(target_pkgs_path, 'pkgs.json')
346346

347347
if not os.path.isfile(fn):
348-
print ('no system configuration file : .config.')
349-
print ('you should use < menuconfig > command to config bsp first.')
348+
print ('No system configuration file : .config.')
349+
print ('You should use < menuconfig > command to config bsp first.')
350350
return
351351

352352
# if not os.path.exists(target_pkgs_path):
@@ -948,7 +948,7 @@ def package_wizard():
948948
f.write(sconscript)
949949
f.close()
950950

951-
print ('\nYour package index was created successfully.')
951+
print ('\nThe package index was created successfully.')
952952

953953

954954
def upgrade_packages_index():

0 commit comments

Comments
 (0)