From 8dca597f29e0ef54525f5f717a7058a037d2e9fc Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 3 Mar 2009 21:58:02 -0600 Subject: [PATCH] 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. --- Makefile | 2 +- version | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 version 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}