summaryrefslogtreecommitdiff
path: root/hadori.C
diff options
context:
space:
mode:
Diffstat (limited to 'hadori.C')
-rw-r--r--hadori.C7
1 files changed, 7 insertions, 0 deletions
diff --git a/hadori.C b/hadori.C
index f462d66..44b6e97 100644
--- a/hadori.C
+++ b/hadori.C
@@ -36,6 +36,7 @@ namespace po = boost::program_options;
#include <sysexits.h>
#include "inode.h"
+#include "version.h"
// needed for equal_range and range-for
namespace std {
@@ -187,6 +188,7 @@ int main (int const argc, char ** argv) {
po::options_description opts("OPTIONS");
opts.add_options()
("help,h", "print this help message")
+ ("version,V", "print version information")
("no-time,t", "ignore mtime")
("hash", "use adler32 hash to speed up comparing many files with same size and mostly identical content")
("dry-run,n", "don't change anything, implies --verbose")
@@ -211,6 +213,11 @@ int main (int const argc, char ** argv) {
return EX_OK;
}
+ if (config.count("version")) {
+ std::cout << HADORI_VERSION << std::endl;
+ return EX_OK;
+ }
+
if (not config.count("debug"))
debug.rdbuf(nullptr);
if (not config.count("debug") and not config.count("verbose") and not config.count("dry-run"))