Added a version script

I added a version script.  This is used in the Makefile to get the
version of espeakup when none is specified when a tarball is created.
This commit is contained in:
William Hubbs 2009-03-03 21:58:02 -06:00
commit 8dca597f29
2 changed files with 6 additions and 1 deletions

View file

@ -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

5
version Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
ver=$(grep "const char.*Version" espeakup.c)
ver=${ver%\"*}
ver=${ver#*\"}
echo ${ver}