aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-08-14 01:22:40 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-08-14 01:22:40 -0300
commit77ec9dd19ae8445735781840c9b9b535afa0a12a (patch)
treeecd82942df153e5af60af047fde6f92dc46b32f0
parent07d3a1f7a2bdfa4f5918b515d617eecbd6e081db (diff)
downloadblogc-77ec9dd19ae8445735781840c9b9b535afa0a12a.tar.gz
blogc-77ec9dd19ae8445735781840c9b9b535afa0a12a.tar.bz2
blogc-77ec9dd19ae8445735781840c9b9b535afa0a12a.zip
main: added BLOGC_VERSION template variable
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 292c9ff..cf0fcd2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -30,6 +30,10 @@
#include "renderer.h"
#include "error.h"
+#ifndef PACKAGE_VERSION
+#define PACKAGE_VERSION "Unknown"
+#endif
+
static void
blogc_print_help(void)
@@ -108,6 +112,7 @@ main(int argc, char **argv)
b_slist_t *sources = NULL;
b_trie_t *config = b_trie_new(free);
+ b_trie_insert(config, "BLOGC_VERSION", b_strdup(PACKAGE_VERSION));
for (unsigned int i = 1; i < argc; i++) {
tmp = NULL;