Updated script
This commit is contained in:
@ -6,7 +6,7 @@ import subprocess
|
|||||||
output = subprocess.check_output(['bash', './switchconf.sh', '--list']).decode('utf-8').splitlines()
|
output = subprocess.check_output(['bash', './switchconf.sh', '--list']).decode('utf-8').splitlines()
|
||||||
|
|
||||||
# read symlink './sdkconfig' to get the current configuration
|
# read symlink './sdkconfig' to get the current configuration
|
||||||
current_config = os.readlink('./sdkconfig')
|
current_config = os.readlink('./sdkconfig').split('sdkconfig_')[1]
|
||||||
|
|
||||||
if len(output) == 0:
|
if len(output) == 0:
|
||||||
print('No configurations found!')
|
print('No configurations found!')
|
||||||
@ -25,4 +25,4 @@ for config in output:
|
|||||||
|
|
||||||
# switch back to current configuration
|
# switch back to current configuration
|
||||||
print('Switching back to configuration: ' + current_config)
|
print('Switching back to configuration: ' + current_config)
|
||||||
subprocess.check_call(['bash', './switchconf.sh', current_config])
|
subprocess.check_call(['bash', './switchconf.sh', current_config])
|
||||||
|
Reference in New Issue
Block a user