diff --git a/Makefile b/Makefile index 9327f65..aaf929b 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ install: install -d $(DESTDIR)/usr/lib/aif/core install -d $(DESTDIR)/usr/lib/aif/user install -D -m755 src/aif.sh $(DESTDIR)/sbin/aif + sed -i s/^VERSION=[[:graph:]]*/VERSION=`git describe --tags`/ $(DESTDIR)/sbin/aif install -D -m755 src/aif-test.sh $(DESTDIR)/sbin/aif-test install -D -m644 README $(DESTDIR)/usr/share/aif/docs install -D -m644 doc/* $(DESTDIR)/usr/share/aif/docs diff --git a/src/aif.sh b/src/aif.sh index a64bb02..4c216e5 100755 --- a/src/aif.sh +++ b/src/aif.sh @@ -12,6 +12,7 @@ LOGFILE=$LOG_DIR/aif.log DISCLAIMER="Note that despite our careful coding and proper testing there may still be bugs in this software.\n When you are doing this installation on a system where some data must be preserved, we suggest you make a backup first" export LC_COLLATE=C # for consistent sorting behavior +VERSION= ###### Early bootstrap ###### @@ -123,6 +124,10 @@ do usage exit ;; + v) + echo "aif $VERSION" + exit + ;; ?) # If we hit something elso, call process_args process_args -$OPTION $OPTARG # you can override this function in your profile to parse additional arguments and/or override the behavior above diff --git a/src/core/libs/lib-flowcontrol.sh b/src/core/libs/lib-flowcontrol.sh index 078a33d..38610b2 100755 --- a/src/core/libs/lib-flowcontrol.sh +++ b/src/core/libs/lib-flowcontrol.sh @@ -6,6 +6,7 @@ usage () -i Override interface type (optional) -d Explicitly enable debugging (/var/log/aif/debug.log) (optional) -l Explicitly enable logging to file (/var/log/aif/aif.log) (optional) + -v Print the version (optional) -h Help: show usage (optional)\n If the procedurename starts with 'http://' it will be wget'ed. Otherwise it's assumed to be a procedure in the VFS tree If the procedurename is prefixed with '/' it will be loaded from user module .\n