This commit is contained in:
Nishi 2026-03-01 20:54:30 +09:00
commit 04e2a70315
Signed by: nishi
GPG key ID: 27EF69B208EB9343
2 changed files with 11 additions and 0 deletions

View file

@ -7,6 +7,8 @@ int main(int argc, char** argv){
char** target_argv = malloc(sizeof(*target_argv));
target_argv[0] = NULL;
printf("Taiga, static website generator - run `%s help' for help\n\n", argv[0]);
for(i = 1; i < argc; i++){
if(argv[i][0] == '-'){
if(action != NULL) continue;
@ -21,4 +23,11 @@ int main(int argc, char** argv){
}
if(action == NULL) action = "site";
if(strcmp(action, "site") == 0){
return action_site(target_argc, target_argv);
}
fprintf(stderr, "Unknown action\n");
return 1;
}

View file

@ -5,4 +5,6 @@
#include <string.h>
#include <stdlib.h>
int action_site(int argc, char** argv);
#endif