Cleanup makefiles, add version to i3 -v and i3 startup

This commit is contained in:
Michael Stapelberg
2009-03-15 23:15:16 +01:00
parent 21f7b7a724
commit eb2ceb95bf
4 changed files with 39 additions and 1 deletions

View File

@ -340,17 +340,22 @@ int main(int argc, char *argv[], char *env[]) {
application_path = sstrdup(argv[0]);
while ((opt = getopt(argc, argv, "c:")) != -1) {
while ((opt = getopt(argc, argv, "c:v")) != -1) {
switch (opt) {
case 'c':
override_configpath = sstrdup(optarg);
break;
case 'v':
printf("i3 version " I3_VERSION " © 2009 Michael Stapelberg and contributors\n");
exit(EXIT_SUCCESS);
default:
fprintf(stderr, "Usage: %s [-c configfile]\n", argv[0]);
exit(EXIT_FAILURE);
}
}
LOG("i3 version " I3_VERSION " starting\n");
/* Initialize the table data structures for each workspace */
init_table();