Skip to content
Snippets Groups Projects
Commit ffc84978 authored by Josh Brooks's avatar Josh Brooks
Browse files

Only write to run.sh if it does not exist

parent 3894a6a3
No related branches found
No related tags found
2 merge requests!68Master merge,!46Xx 4478/templatize
......@@ -183,9 +183,10 @@ def generate_server_side_config(offset: int, newPackage: string):
with open("{}/noerrors.txt".format(newPackage), "w") as f:
f.write(no_errors)
with open("{}/run.sh".format(newPackage), "w") as f:
run_template = run_template.replace("{entry_point}", str(gateway_ports[0]))
f.write(run_template)
if not os.path.exists("{}/run.sh".format(newPackage)):
with open("{}/run.sh".format(newPackage), "w") as f:
run_template = run_template.replace("{entry_point}", str(gateway_ports[0]))
f.write(run_template)
# Set the executable permissions on the bash script file
os.chmod("{}/run.sh".format(newPackage), 0o755)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment