debut main.c

This commit is contained in:
eleonore12345 2024-07-31 16:43:15 +02:00
parent e3af6a25f9
commit 5d524ee451

36
main.c Normal file
View File

@ -0,0 +1,36 @@
// deployer main programm
// Copyright (C) 2024 Jean-Cloud
// GNU General Public License v3
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdbool.h>
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;
}