mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
add simple version flag
This commit is contained in:
parent
1396551433
commit
7ee03be2e9
26
src/main.cpp
26
src/main.cpp
@ -149,23 +149,21 @@ main(int ac, const char** av)
|
|||||||
const char* classpath = ".";
|
const char* classpath = ".";
|
||||||
|
|
||||||
for (int i = 1; i < ac; ++i) {
|
for (int i = 1; i < ac; ++i) {
|
||||||
if (strcmp(av[i], "-cp") == 0
|
if (strcmp(av[i], "-cp") == 0 or strcmp(av[i], "-classpath") == 0) {
|
||||||
or strcmp(av[i], "-classpath") == 0)
|
if (i + 1 == ac)
|
||||||
{
|
usageAndExit(av[0]);
|
||||||
if (i + 1 == ac) usageAndExit(av[0]);
|
|
||||||
classpath = av[++i];
|
classpath = av[++i];
|
||||||
} else if (strcmp(av[i], "-jar") == 0)
|
} else if (strcmp(av[i], "-jar") == 0) {
|
||||||
{
|
if (i + 1 == ac)
|
||||||
if (i + 1 == ac) usageAndExit(av[0]);
|
usageAndExit(av[0]);
|
||||||
jar = av[++i];
|
jar = av[++i];
|
||||||
} else if (strncmp(av[i], "-X", 2) == 0
|
} else if (strncmp(av[i], "-X", 2) == 0 or strncmp(av[i], "-D", 2) == 0) {
|
||||||
or strncmp(av[i], "-D", 2) == 0)
|
++vmArgs.nOptions;
|
||||||
{
|
} else if (strcmp(av[i], "-client") == 0 or strcmp(av[i], "-server") == 0) {
|
||||||
++ vmArgs.nOptions;
|
|
||||||
} else if (strcmp(av[i], "-client") == 0
|
|
||||||
or strcmp(av[i], "-server") == 0)
|
|
||||||
{
|
|
||||||
// ignore
|
// ignore
|
||||||
|
} else if (strcmp(av[i], "-version") == 0) {
|
||||||
|
fprintf(stderr, "Avian " AVIAN_VERSION "\n");
|
||||||
|
exit(0);
|
||||||
} else {
|
} else {
|
||||||
if (jar == 0) {
|
if (jar == 0) {
|
||||||
class_ = av[i++];
|
class_ = av[i++];
|
||||||
|
Loading…
Reference in New Issue
Block a user