aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpm/app/main.f9013
1 files changed, 7 insertions, 6 deletions
diff --git a/fpm/app/main.f90 b/fpm/app/main.f90
index 8533f8c..ad1a9e0 100644
--- a/fpm/app/main.f90
+++ b/fpm/app/main.f90
@@ -7,12 +7,13 @@ if (command_argument_count() == 0) then
call print_help()
else if (command_argument_count() == 1) then
call get_command_argument(1, cmdarg)
- if (cmdarg == "build") then
- call cmd_build()
- else
- print *, "Unknown command: ", cmdarg
- error stop
- end if
+ select case(trim(cmdarg))
+ case("build")
+ call cmd_build()
+ case default
+ print *, "Unknown command: ", cmdarg
+ error stop
+ end select
else
print *, "Too many arguments"
error stop