drogon/drogon_ctl/main.cc

40 lines
695 B
C++
Raw Normal View History

2018-05-31 09:00:31 +00:00
/**
*
* @file
* @author An Tao
* @section LICENSE
*
* Copyright 2018, An Tao. All rights reserved.
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* @section DESCRIPTION
* this is a drogon lib tool program
* run drogon_ctl help to get usage
*/
#include "cmd.h"
2018-05-28 06:34:47 +00:00
#include <string>
#include <vector>
#include <iostream>
2018-05-28 06:34:47 +00:00
int main(int argc, char* argv[])
{
if(argc<2)
{
2018-05-30 09:44:09 +00:00
std::vector<std::string> args={"help"};
exeCommand(args);
2018-05-28 06:34:47 +00:00
return 0;
}
std::vector<std::string> args;
for(int i=1;i<argc;i++)
2018-05-28 06:34:47 +00:00
{
args.push_back(argv[i]);
2018-05-28 06:34:47 +00:00
}
exeCommand(args);
2018-05-28 06:34:47 +00:00
return 0;
}