3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-12 20:18:20 +00:00

yosys-config: Propagate exit code for help command

This commit is contained in:
Miodrag Milanovic 2025-03-31 16:19:45 +02:00
parent 314842d2a0
commit 58a515d57f

View file

@ -37,11 +37,11 @@ help() {
echo " $0 --datdir/simlib.v" echo " $0 --datdir/simlib.v"
echo "" echo ""
} >&2 } >&2
exit 1 exit $1
} }
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
help help 1
fi fi
if [ "$1" = "--build" ]; then if [ "$1" = "--build" ]; then
@ -83,7 +83,7 @@ for opt; do
tokens=( "${tokens[@]}" '@DATDIR@'"${opt#${prefix}datdir}" ) ;; tokens=( "${tokens[@]}" '@DATDIR@'"${opt#${prefix}datdir}" ) ;;
--help|-\?|-h) --help|-\?|-h)
if [ ${#tokens[@]} -eq 0 ]; then if [ ${#tokens[@]} -eq 0 ]; then
help help 0
else else
tokens=( "${tokens[@]}" "$opt" ) tokens=( "${tokens[@]}" "$opt" )
fi ;; fi ;;