From f213a34427d6b0b99feb3e39d140f13934322468 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Wed, 22 Apr 2026 10:39:19 +0200 Subject: [PATCH] Remove FHS dependency by replacing /bin/bash with /usr/bin/env bash everywhere --- .github/workflows/wheels/cibw_before_all.sh | 2 +- docs/source/using_yosys/bugpoint.rst | 4 ++-- examples/aiger/README | 2 +- examples/aiger/demo.sh | 2 +- examples/anlogic/build.sh | 2 +- examples/basys3/run.sh | 2 +- examples/cmos/testbench.sh | 2 +- examples/cmos/testbench_digital.sh | 2 +- examples/gowin/run.sh | 2 +- examples/igloo2/runme.sh | 2 +- examples/intel/DE2i-150/quartus_compile/runme_quartus | 2 +- examples/intel/MAX10/runme_postsynth | 2 +- examples/intel/asicworld_lfsr/runme_postsynth | 2 +- examples/intel/asicworld_lfsr/runme_presynth | 2 +- misc/create_vcxsrc.sh | 2 +- tests/aiger/generate_mk.py | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/wheels/cibw_before_all.sh b/.github/workflows/wheels/cibw_before_all.sh index 1aef650d7..6450ce273 100644 --- a/.github/workflows/wheels/cibw_before_all.sh +++ b/.github/workflows/wheels/cibw_before_all.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -x # Build-time dependencies diff --git a/docs/source/using_yosys/bugpoint.rst b/docs/source/using_yosys/bugpoint.rst index c524470af..71ec3b68d 100644 --- a/docs/source/using_yosys/bugpoint.rst +++ b/docs/source/using_yosys/bugpoint.rst @@ -293,7 +293,7 @@ is still valid. :caption: Example test.sh for C-Reduce :name: egtest - #!/bin/bash + #!/usr/bin/env bash verilator --lint-only test.v &&/ yosys -p 'logger -expect error "unsupported" 1; read_verilog test.v' @@ -333,7 +333,7 @@ an input argument: ``sv-bugpoint outDir/ test.sh test.v`` .. code-block:: bash :caption: Example test.sh for sv-bugpoint - #!/bin/bash + #!/usr/bin/env bash verilator --lint-only $1 &&/ yosys -p "logger -expect error \"unsupported\" 1; read_verilog $1" diff --git a/examples/aiger/README b/examples/aiger/README index 4e7694e95..13dce2035 100644 --- a/examples/aiger/README +++ b/examples/aiger/README @@ -14,7 +14,7 @@ in the PATH. E.g. extract the release to /usr/local/libexec/super_prove and then create a /usr/local/bin/super_prove file with the following contents (and "chmod +x" that file): - #!/bin/bash + #!/usr/bin/env bash exec /usr/local/libexec/super_prove/bin/super_prove.sh "$@" The "demo.sh" script also expects the "z3" SMT2 solver in the PATH for diff --git a/examples/aiger/demo.sh b/examples/aiger/demo.sh index 8728b6722..a1217bbd2 100644 --- a/examples/aiger/demo.sh +++ b/examples/aiger/demo.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex yosys -p ' read_verilog -formal demo.v diff --git a/examples/anlogic/build.sh b/examples/anlogic/build.sh index e0f6b4cfe..9b6e8c479 100755 --- a/examples/anlogic/build.sh +++ b/examples/anlogic/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex yosys demo.ys $TD_HOME/bin/td build.tcl diff --git a/examples/basys3/run.sh b/examples/basys3/run.sh index 10f059103..deb68d432 100644 --- a/examples/basys3/run.sh +++ b/examples/basys3/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash yosys run_yosys.ys vivado -nolog -nojournal -mode batch -source run_vivado.tcl vivado -nolog -nojournal -mode batch -source run_prog.tcl diff --git a/examples/cmos/testbench.sh b/examples/cmos/testbench.sh index 061704b64..856169ab9 100644 --- a/examples/cmos/testbench.sh +++ b/examples/cmos/testbench.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/examples/cmos/testbench_digital.sh b/examples/cmos/testbench_digital.sh index d7ab0fe1f..2e70e874c 100644 --- a/examples/cmos/testbench_digital.sh +++ b/examples/cmos/testbench_digital.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/examples/gowin/run.sh b/examples/gowin/run.sh index cd260101e..960624464 100644 --- a/examples/gowin/run.sh +++ b/examples/gowin/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex yosys -p "synth_gowin -top demo -vout demo_syn.v" demo.v $GOWIN_HOME/bin/gowin -d demo_syn.v -cst demo.cst -sdc demo.sdc -p GW1NR-9-QFN88-6 -pn GW1NR-LV9QN88C6/I5 -cfg device.cfg -bit -tr -ph -timing -gpa -rpt -warning_all diff --git a/examples/igloo2/runme.sh b/examples/igloo2/runme.sh index a08894e0a..7349ff603 100644 --- a/examples/igloo2/runme.sh +++ b/examples/igloo2/runme.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex yosys -p 'synth_sf2 -top example -edif netlist.edn -vlog netlist.vm' example.v export LM_LICENSE_FILE=${LM_LICENSE_FILE:-1702@localhost} diff --git a/examples/intel/DE2i-150/quartus_compile/runme_quartus b/examples/intel/DE2i-150/quartus_compile/runme_quartus index 83aa3b609..2bc29582c 100644 --- a/examples/intel/DE2i-150/quartus_compile/runme_quartus +++ b/examples/intel/DE2i-150/quartus_compile/runme_quartus @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export REV="de2i" diff --git a/examples/intel/MAX10/runme_postsynth b/examples/intel/MAX10/runme_postsynth index f16210540..657c05fa8 100644 --- a/examples/intel/MAX10/runme_postsynth +++ b/examples/intel/MAX10/runme_postsynth @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash iverilog -D POST_IMPL -o verif_post -s tb_top tb_top.v top.vqm $(yosys-config --datdir/altera_intel/max10/cells_comb_max10.v) vvp -N verif_post diff --git a/examples/intel/asicworld_lfsr/runme_postsynth b/examples/intel/asicworld_lfsr/runme_postsynth index c3b26b034..ad5ca39d4 100755 --- a/examples/intel/asicworld_lfsr/runme_postsynth +++ b/examples/intel/asicworld_lfsr/runme_postsynth @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash iverilog -D POST_IMPL -o verif_post -s tb lfsr_updown_tb.v top.vqm $(yosys-config --datdir/altera_intel/max10/cells_comb_max10.v) vvp -N verif_post diff --git a/examples/intel/asicworld_lfsr/runme_presynth b/examples/intel/asicworld_lfsr/runme_presynth index 51118bb4b..3ed6618d3 100755 --- a/examples/intel/asicworld_lfsr/runme_presynth +++ b/examples/intel/asicworld_lfsr/runme_presynth @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash iverilog -o presynth lfsr_updown_tb.v lfsr_updown.v &&\ diff --git a/misc/create_vcxsrc.sh b/misc/create_vcxsrc.sh index 42a690ce6..98c1817bd 100644 --- a/misc/create_vcxsrc.sh +++ b/misc/create_vcxsrc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex vcxsrc="$1" diff --git a/tests/aiger/generate_mk.py b/tests/aiger/generate_mk.py index 6c27455b9..a90a63527 100644 --- a/tests/aiger/generate_mk.py +++ b/tests/aiger/generate_mk.py @@ -54,6 +54,6 @@ def create_tests(): "rm -f aigmap.err" ])) -extra = [ f"ABC ?= {gen_tests_makefile.yosys_basedir}/yosys-abc", "SHELL := /bin/bash" ] +extra = [ f"ABC ?= {gen_tests_makefile.yosys_basedir}/yosys-abc", "SHELL := /usr/bin/env bash" ] gen_tests_makefile.generate_custom(create_tests, extra)