mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	yosys-config: Propagate exit code for help command
This commit is contained in:
		
							parent
							
								
									314842d2a0
								
							
						
					
					
						commit
						58a515d57f
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -37,11 +37,11 @@ help() {
 | 
			
		|||
		echo "  $0 --datdir/simlib.v"
 | 
			
		||||
		echo ""
 | 
			
		||||
	} >&2
 | 
			
		||||
	exit 1
 | 
			
		||||
	exit $1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if [ $# -eq 0 ]; then
 | 
			
		||||
	help
 | 
			
		||||
	help 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ "$1" = "--build" ]; then
 | 
			
		||||
| 
						 | 
				
			
			@ -83,7 +83,7 @@ for opt; do
 | 
			
		|||
			tokens=( "${tokens[@]}" '@DATDIR@'"${opt#${prefix}datdir}" ) ;;
 | 
			
		||||
		--help|-\?|-h)
 | 
			
		||||
			if [ ${#tokens[@]} -eq 0 ]; then
 | 
			
		||||
				help
 | 
			
		||||
				help 0
 | 
			
		||||
			else
 | 
			
		||||
				tokens=( "${tokens[@]}" "$opt" )
 | 
			
		||||
			fi ;;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue