diff --git a/main.c b/main.c new file mode 100644 index 0000000..5e80dc8 --- /dev/null +++ b/main.c @@ -0,0 +1,36 @@ +// deployer main programm +// Copyright (C) 2024 Jean-Cloud +// GNU General Public License v3 + +#include +#include +#include +#include +#include + +int DEPLOY=false; +int REMOVE=false; + +void help() +{ + printf("usage: ./deployer action file \n with action=deploy or remove and file=path to a file or all. \n"); +} + +int main(int argc, char *argv[]) +{ + if (argc != 3){ + printf("Invalid number of arguments. \n"); + help(); + exit(1); + } else { + if (strcmp(argv[1], "deploy")==0){ + DEPLOY=true; + } else if (strcmp(argv[1], "remove")==0){ + REMOVE=true; + } else { + printf("Invalid argument. \n"); + exit(1); + } + } + return 0; +} \ No newline at end of file