summaryrefslogtreecommitdiffstats
path: root/src/DabMux.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-07-21 15:51:54 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-07-21 15:51:54 +0200
commit40883fad3ef90ca16d09d36153dd255c531d7333 (patch)
tree39d4099e9acd4044aacd58a5dcff0b2657a68dea /src/DabMux.cpp
parent41c2099b66a465a60dddd7e63dc66d653abd8a9a (diff)
downloaddabmux-40883fad3ef90ca16d09d36153dd255c531d7333.tar.gz
dabmux-40883fad3ef90ca16d09d36153dd255c531d7333.tar.bz2
dabmux-40883fad3ef90ca16d09d36153dd255c531d7333.zip
Add --version option
Diffstat (limited to 'src/DabMux.cpp')
-rw-r--r--src/DabMux.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index de0c362..c4fb692 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -159,6 +159,18 @@ void signalHandler(int signum)
int main(int argc, char *argv[])
{
+ // Version handling is done very early to ensure nothing else but the version gets printed out
+ if (argc == 2 and strcmp(argv[1], "--version") == 0) {
+ fprintf(stdout, "%s\n",
+#if defined(GITVERSION)
+ GITVERSION
+#else
+ PACKAGE_VERSION
+#endif
+ );
+ return 0;
+ }
+
header_message();
struct sigaction sa;