Closed MarcelRobitaille closed 1 year ago
In generate_schematic_artifacts and generate_layout_artifacts there is a test for whether kicad-cli exists:
generate_schematic_artifacts
generate_layout_artifacts
kicad-cli
if [[ -f $(which kicad-cli 2>&1 > /dev/null) ]]
Since all output is piped into /dev/null, nothing is returned from which, so the test for the file's existence fails.
/dev/null
which
Instead of checking for the existence of /usr/bin/kicad-cli, I would recommend if type kicad-cli or if command -v kicad-cli.
/usr/bin/kicad-cli
if type kicad-cli
if command -v kicad-cli
Stack-Overflow: How can I check if a command exists in a shell script?
This was just a quick test to make this kicad 7 working. please, check the latest version.
In
generate_schematic_artifacts
andgenerate_layout_artifacts
there is a test for whetherkicad-cli
exists:Since all output is piped into
/dev/null
, nothing is returned fromwhich
, so the test for the file's existence fails.Instead of checking for the existence of
/usr/bin/kicad-cli
, I would recommendif type kicad-cli
orif command -v kicad-cli
.Stack-Overflow: How can I check if a command exists in a shell script?