Write commandline args

This commit is contained in:
Dalton 2024-03-21 22:33:16 -04:00
parent 26801db037
commit 36669b811c
No known key found for this signature in database
GPG Key ID: B79F019777948D83
2 changed files with 20 additions and 1 deletions

View File

@ -32,6 +32,26 @@ def vram_check():
else:
return 3
# Function to write new args to webui-user.bat file
def write_commandline_args():
bat_file = "./webui-user.bat"
## TODO: Switch this to use actual dynamic commandline args from user options and system info
new_commandline_args = ""
# Read webui-user.bat file and save lines
with open(bat_file, 'r') as file:
lines = file.readlines()
# Modify lines to have new commandline args
for i, line in enumerate(lines):
if line.strip().startswith('set COMMANDLINE_ARGS='):
lines[i] = f'set COMMANDLINE_ARGS={new_commandline_args}\n'
break
# Write lines back to file
with open(bat_file, 'w') as file:
file.writelines(lines)
## Main starting check sequence
def start_check_sequence():
print("Running system checks")

View File

@ -1 +0,0 @@
1