From ace1314e025868d5f9ecee3a8c0ab00dafcd6052 Mon Sep 17 00:00:00 2001 From: Jevin Sweval Date: Mon, 6 Jun 2022 11:31:39 -0700 Subject: [PATCH] Quartus: Remove bashism from win32 bat script and add shebang on Linux --- litex/build/altera/quartus.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/litex/build/altera/quartus.py b/litex/build/altera/quartus.py index 74d903c0d..762d0ed25 100644 --- a/litex/build/altera/quartus.py +++ b/litex/build/altera/quartus.py @@ -150,13 +150,14 @@ def _build_qsf(device, ips, sources, vincpaths, named_sc, named_pc, build_name, def _build_script(build_name, create_rbf): if sys.platform in ["win32", "cygwin"]: - script_contents = "REM Autogenerated by LiteX / git: " + tools.get_litex_git_revision() script_file = "build_" + build_name + ".bat" + script_contents = "REM Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\n" else: - script_contents = "# Autogenerated by LiteX / git: " + tools.get_litex_git_revision() script_file = "build_" + build_name + ".sh" + script_contents = "#!/usr/bin/env bash\n" + script_contents += "# Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\n" + script_contents += "set -e -u -x -o pipefail\n" script_contents += """ -set -e -u -x -o pipefail quartus_map --read_settings_files=on --write_settings_files=off {build_name} -c {build_name} quartus_fit --read_settings_files=off --write_settings_files=off {build_name} -c {build_name} quartus_asm --read_settings_files=off --write_settings_files=off {build_name} -c {build_name}