""".format(build_name=build_name)
build_script_file = "build_" + build_name + ".sh"
- tools.write_to_file(build_script_file, build_script_contents)
+ tools.write_to_file(build_script_file, build_script_contents, force_unix=True)
r = subprocess.call(["bash", build_script_file])
if r != 0:
return "vhdl"
return None
-def write_to_file(filename, contents):
- f = open(filename, "w")
+def write_to_file(filename, contents, force_unix=False):
+ newline = None
+ if force_unix:
+ newline = "\n"
+ f = open(filename, "w", newline=newline)
f.write(contents)
f.close()
par_opt=par_opt, map_opt=map_opt)
build_script_contents += ise_commands.format(build_name=build_name)
build_script_file = "build_" + build_name + ".sh"
- tools.write_to_file(build_script_file, build_script_contents)
+ tools.write_to_file(build_script_file, build_script_contents, force_unix=True)
r = subprocess.call(["bash", build_script_file])
if r != 0: