sh8s_deployer/main.cpp
2024-08-01 16:12:53 +02:00

47 lines
960 B
C++

// deployer main programm
// Copyright (C) 2024 Jean-Cloud
// GNU General Public License v3
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cstring>
#include "Services.h"
#include "Module.h"
using namespace std;
bool action_deploy=false;
bool action_remove=false;
bool all=false;
void help()
{
//temporary
cout << "usage: ./deployer action file \n with action=deploy or remove and file=path to a file or all. \n" << endl;
}
int main(int argc, char *argv[])
{
if (argc != 3){
cout << "Invalid number of arguments. \n" << endl;
help();
exit(1);
} else {
if (strcmp(argv[1],"deploy")==0){
action_deploy=true;
} else if (strcmp(argv[1],"remove")==0){
action_remove=true;
} else {
cout << "Invalid argument. \n" << endl;
exit(1);
}
Services myServices=Services("services.csv");
}
return 0;
}