build+core: Add printing of version number in daemons and tools
This commit also changes how version number is handled. Version is now
fully controlled from top-level wscript. In addition to that, a new
NFD_VERSION_BUILD_STRING macro is set to include more detailed
information, including commit ID (e.g., "0.1.0-rc1-1-g5c86570").
Change-Id: I448eb627e0c42dc814de1107cf7bb0dc94fa2a89
Refs: #1575
diff --git a/tools/nfd-start.sh b/tools/nfd-start.sh
index 9fe9424..4df12d7 100755
--- a/tools/nfd-start.sh
+++ b/tools/nfd-start.sh
@@ -1,5 +1,25 @@
#!@BASH@
+VERSION="@VERSION@"
+
+case "$1" in
+ -h)
+ echo Usage
+ echo $0
+ echo " Start NFD and RIB Management daemon"
+ exit 0
+ ;;
+ -V)
+ echo $VERSION
+ exit 0
+ ;;
+ "") ;; # do nothing
+ *)
+ echo "Unrecognized option $1"
+ exit 1
+ ;;
+esac
+
hasProcess() {
local processName=$1