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
 | 
					set_config_vars
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ $# -lt 1 ]
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
 | 
						echo "No subcommand was specified. Use the 'help' subcommand."
 | 
				
			||||||
 | 
						exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
case $1 in
 | 
					case $1 in
 | 
				
			||||||
	new)
 | 
						new)
 | 
				
			||||||
		if [ $# -lt 2 ]
 | 
							if [ $# -lt 2 ]
 | 
				
			||||||
@@ -224,7 +230,7 @@ case $1 in
 | 
				
			|||||||
					then
 | 
										then
 | 
				
			||||||
						NEW_DIR="$i"
 | 
											NEW_DIR="$i"
 | 
				
			||||||
					else
 | 
										else
 | 
				
			||||||
						echo "Unknown argument for new '$i'. Use the 'help' command."
 | 
											echo "Unknown argument for new '$i'. Use the 'help' subcommand."
 | 
				
			||||||
						print_usage
 | 
											print_usage
 | 
				
			||||||
						exit 1
 | 
											exit 1
 | 
				
			||||||
					fi
 | 
										fi
 | 
				
			||||||
@@ -242,7 +248,7 @@ case $1 in
 | 
				
			|||||||
	version)
 | 
						version)
 | 
				
			||||||
		echo "$PROJECT_NAME v$ISIDORE_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
 | 
							print_usage
 | 
				
			||||||
		exit 1;;
 | 
							exit 1;;
 | 
				
			||||||
esac
 | 
					esac
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user