[thin_delta] --version/-V

This commit is contained in:
Joe Thornber
2014-06-09 10:37:46 +01:00
parent ae21670fd1
commit 87fa6dc079
3 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#include <getopt.h>
#include <iostream>
#include "version.h"
using namespace std;
//----------------------------------------------------------------
int main(int argc, char **argv)
{
int c;
char const shortopts[] = "V";
option const longopts[] = {
{ "version", no_argument, NULL, 'V'}
};
while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
switch (c) {
case 'V':
cout << THIN_PROVISIONING_TOOLS_VERSION << endl;
return 0;
}
}
return 0;
}
//----------------------------------------------------------------