DynuIPRefresher/src/main.cpp

23 lines
776 B
C++
Raw Normal View History

2019-05-05 13:38:48 +00:00
#include <iostream>
#include <IPRefresher.h>
2019-05-05 13:38:48 +00:00
2019-05-06 10:55:01 +00:00
int main(int argc, char *argv[]) {
2019-05-06 16:49:38 +00:00
if (argc > 1) {
2019-05-06 10:55:01 +00:00
std::string firstarg(argv[1]);
2019-05-06 16:49:38 +00:00
if (firstarg == "-h" || firstarg == "--help") {
std::cout << "help page: " << std::endl << "[-h] [--help] print this help page" << std::endl
<< "[-v] [--version] print the software version" << std::endl
<< "[no argument] normal ip check and refresh" << std::endl;
} else if (firstarg == "-v" || firstarg == "--version") {
2019-05-06 10:55:01 +00:00
std::cout << "Version 1.0" << std::endl;
2019-05-06 16:49:38 +00:00
} else {
2019-05-06 10:55:01 +00:00
std::cout << "wrong arguments! -h for help" << std::endl;
}
2019-05-06 16:49:38 +00:00
} else {
IPRefresher ipr;
ipr.checkIPAdress();
2019-05-05 16:50:10 +00:00
}
2019-05-05 13:38:48 +00:00
return 0;
}