docs: Update docs and add release notes
refs: #1923
Change-Id: I89968ef130e85068eb20cfd2b81e414a16d243b8
diff --git a/src/main.cpp b/src/main.cpp
index c46aea2..3d287a0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -25,6 +25,7 @@
#include "nlsr.hpp"
#include "conf-file-processor.hpp"
#include "logger.hpp"
+#include "version.hpp"
using namespace nlsr;
@@ -35,20 +36,24 @@
std::string programName(argv[0]);
nlsr.setConfFileName("nlsr.conf");
int32_t opt;
- while ((opt = getopt(argc, argv, "df:h")) != -1) {
+ while ((opt = getopt(argc, argv, "df:hV")) != -1) {
switch (opt)
- {
+ {
case 'f':
nlsr.setConfFileName(optarg);
break;
case 'd':
nlsr.setIsDaemonProcess(true);
break;
+ case 'V':
+ std::cout << NLSR_VERSION_BUILD_STRING << std::endl;
+ return EXIT_SUCCESS;
+ break;
case 'h':
default:
nlsr.usage(programName);
return EXIT_FAILURE;
- }
+ }
}
ConfFileProcessor cfp(nlsr, nlsr.getConfFileName());
if(!cfp.processConfFile()) {