gout_main.c (678B)
1 #include "gout.h" 2 3 #include <locale.h> 4 #include <stdio.h> 5 #include <stdlib.h> 6 7 #include "fs_posix.h" 8 9 static void gout_usage(const char* program_name) { 10 fprintf(stderr, 11 "usage: %s [-H | -G | -M] [-c cachefile | -l commits] [-u baseurl] " 12 "repodir\n", 13 program_name); 14 } 15 16 int main(int argc, const char* argv[]) { 17 setlocale(LC_ALL, ""); 18 GoutOptions* options = gout_options_create(argc, argv); 19 if (options == NULL) { 20 gout_usage(argv[0]); 21 exit(1); 22 } 23 24 Git* git = gout_git_create(g_fs_posix); 25 gout_init(options, git); 26 gout_run(options, git); 27 28 git->shutdown(git); 29 gout_git_free(git); 30 31 gout_options_free(options); 32 return 0; 33 }