aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;