Updated script

This commit is contained in:
CommanderRedYT
2022-05-30 15:39:02 +02:00
parent 89e5428af2
commit 4ac8896591

View File

@ -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])