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:
parent
314842d2a0
commit
58a515d57f
|
@ -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 ;;
|
||||||
|
|
Loading…
Reference in a new issue