diff --git a/Makefile b/Makefile index 75097ac..f21a128 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ ifeq ("$(origin TAG)", "command line") TIMESTAMP := _p$(shell date +%Y%m%d) endif -VERSION := $(shell grep 'Version.*=' espeakup.c | sed 's/.*"\(.*\)";/\1/') +VERSION := $(shell ./version) TAG := v$(VERSION) TARPREFIX := espeakup-$(VERSION) TARFILE := $(TARPREFIX)$(TIMESTAMP).tar diff --git a/version b/version new file mode 100755 index 0000000..de85fd8 --- /dev/null +++ b/version @@ -0,0 +1,5 @@ +#!/bin/bash +ver=$(grep "const char.*Version" espeakup.c) +ver=${ver%\"*} +ver=${ver#*\"} +echo ${ver}