Test for too few commands.
This commit is contained in:
		
							
								
								
									
										10
									
								
								isidore.sh
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								isidore.sh
									
									
									
									
									
								
							@@ -204,6 +204,12 @@ function build_project()
 | 
			
		||||
 | 
			
		||||
set_config_vars
 | 
			
		||||
 | 
			
		||||
if [ $# -lt 1 ]
 | 
			
		||||
then
 | 
			
		||||
	echo "No subcommand was specified. Use the 'help' subcommand."
 | 
			
		||||
	exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
case $1 in
 | 
			
		||||
	new)
 | 
			
		||||
		if [ $# -lt 2 ]
 | 
			
		||||
@@ -224,7 +230,7 @@ case $1 in
 | 
			
		||||
					then
 | 
			
		||||
						NEW_DIR="$i"
 | 
			
		||||
					else
 | 
			
		||||
						echo "Unknown argument for new '$i'. Use the 'help' command."
 | 
			
		||||
						echo "Unknown argument for new '$i'. Use the 'help' subcommand."
 | 
			
		||||
						print_usage
 | 
			
		||||
						exit 1
 | 
			
		||||
					fi
 | 
			
		||||
@@ -242,7 +248,7 @@ case $1 in
 | 
			
		||||
	version)
 | 
			
		||||
		echo "$PROJECT_NAME v$ISIDORE_VERSION";;
 | 
			
		||||
	*)
 | 
			
		||||
		echo "Unknown command $1. Use the 'help' command."
 | 
			
		||||
		echo "Unknown command $1. Use the 'help' subcommand."
 | 
			
		||||
		print_usage
 | 
			
		||||
		exit 1;;
 | 
			
		||||
esac
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user