wip
This commit is contained in:
23
main.c
23
main.c
@@ -30,6 +30,7 @@ void usage(int status)
|
|||||||
printf(" or: %s [options]\n\n", PROGRAM_NAME);
|
printf(" or: %s [options]\n\n", PROGRAM_NAME);
|
||||||
fputs(" -s enable shell creation mode\n", stdout);
|
fputs(" -s enable shell creation mode\n", stdout);
|
||||||
fputs(" -S enable shell creation mode as a full project\n", stdout);
|
fputs(" -S enable shell creation mode as a full project\n", stdout);
|
||||||
|
fputs(" -i ignore estruct.h and prompt for all\n", stdout);
|
||||||
fputs(" --help display this help and exit\n", stdout);
|
fputs(" --help display this help and exit\n", stdout);
|
||||||
fputs(" --version output version information and exit\n", stdout);
|
fputs(" --version output version information and exit\n", stdout);
|
||||||
|
|
||||||
@@ -38,8 +39,8 @@ void usage(int status)
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int S = 0;
|
int i = 0;
|
||||||
int mode = -1;
|
int shell_mode = 0;
|
||||||
char *package = NULL;
|
char *package = NULL;
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
@@ -56,14 +57,12 @@ int main(int argc, char **argv)
|
|||||||
version();
|
version();
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
else if (strcmp(argv[i], "-s") == 0) {
|
else if (strcmp(argv[i], "-s") == 0)
|
||||||
S = 1;
|
shell_mode = SINGLE;
|
||||||
mode = SINGLE;
|
else if (strcmp(argv[i], "-S") == 0)
|
||||||
}
|
shell_mode = FULL;
|
||||||
else if (strcmp(argv[i], "-S") == 0) {
|
else if (strcmp(argv[i], "-i") == 0)
|
||||||
S = 1;
|
i = 1;
|
||||||
mode = FULL;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
die("unknown option");
|
die("unknown option");
|
||||||
}
|
}
|
||||||
@@ -74,8 +73,8 @@ int main(int argc, char **argv)
|
|||||||
if (!package)
|
if (!package)
|
||||||
die("no package name provided");
|
die("no package name provided");
|
||||||
|
|
||||||
if (S == SINGLE || S == FULL)
|
if (shell_mode)
|
||||||
makeshell(package, mode);
|
makeshell(package, shell_mode);
|
||||||
else
|
else
|
||||||
makeproj(package);
|
makeproj(package);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user