diff options
author | onefang | 2021-09-02 12:25:29 +1000 |
---|---|---|
committer | onefang | 2021-09-02 12:25:29 +1000 |
commit | 0a756175baa7076bc74223cb9bfe6ac801776fb0 (patch) | |
tree | 774ba6222f0b61879049de163741edd0486a6461 | |
parent | Pass all arguments if running a .shini file. (diff) | |
download | opensim-SC-0a756175baa7076bc74223cb9bfe6ac801776fb0.zip opensim-SC-0a756175baa7076bc74223cb9bfe6ac801776fb0.tar.gz opensim-SC-0a756175baa7076bc74223cb9bfe6ac801776fb0.tar.bz2 opensim-SC-0a756175baa7076bc74223cb9bfe6ac801776fb0.tar.xz |
Move initial option parsing to begining.
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 3bd1a3b..334f6b9 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c | |||
@@ -8166,6 +8166,27 @@ void sledjchisl_main(void) | |||
8166 | configs = qhashtbl(0, 0); | 8166 | configs = qhashtbl(0, 0); |
8167 | L = luaL_newstate(); | 8167 | L = luaL_newstate(); |
8168 | 8168 | ||
8169 | if (0 == toys.optc) | ||
8170 | ; | ||
8171 | else if (strcmp(toys.optargs[0], "backup") == 0) | ||
8172 | currentMode = BACKUP; | ||
8173 | else if (strcmp(toys.optargs[0], "gitar") == 0) | ||
8174 | currentMode = GITAR; | ||
8175 | else if (strcmp(toys.optargs[0], "restart") == 0) | ||
8176 | currentMode = RESTART; | ||
8177 | else if (strcmp(toys.optargs[0], "start") == 0) | ||
8178 | currentMode = START; | ||
8179 | else if (strcmp(toys.optargs[0], "status") == 0) | ||
8180 | currentMode = STATUS; | ||
8181 | else if (strcmp(toys.optargs[0], "build") == 0) | ||
8182 | currentMode = BUILD; | ||
8183 | else if (strcmp(toys.optargs[0], "test") == 0) | ||
8184 | currentMode = TEST; | ||
8185 | else if (strcmp(toys.optargs[0], "update") == 0) | ||
8186 | currentMode = UPDATE; | ||
8187 | else if (strcmp(toys.optargs[0], "stop") == 0) | ||
8188 | currentMode = STOP; | ||
8189 | |||
8169 | V("libfcgi version: %s", FCGI_VERSION); | 8190 | V("libfcgi version: %s", FCGI_VERSION); |
8170 | V("Lua version: %s", LUA_RELEASE); | 8191 | V("Lua version: %s", LUA_RELEASE); |
8171 | V("LuaJIT version: %s", LUAJIT_VERSION); | 8192 | V("LuaJIT version: %s", LUAJIT_VERSION); |