From 53f1363352784866ed4b8ea098260fff004c9a5e Mon Sep 17 00:00:00 2001 From: David Caldwell Date: Fri, 16 Jan 2009 14:14:46 -0800 Subject: [PATCH] Pull version number out of a comment and into a standard perl $VERSION variable. --- Makefile | 2 +- commit-patch | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4f796ef..8cdfdf0 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION := $(shell perl -ne 's/^\# Version: // and print' commit-patch) +VERSION := $(shell perl -ne '/VERSION\s*=\s*'"'(.*)'"'/ and print "$$1"' commit-patch) all: executable commit-partial commit-patch.1 commit-partial.1 commit-patch.html diff --git a/commit-patch b/commit-patch index f03cb50..11e5d40 100755 --- a/commit-patch +++ b/commit-patch @@ -2,7 +2,8 @@ # Copyright (c) 2003-2009 David Caldwell # and Jim Radford , All Rights Reserved. # This code can be distributed under the terms of the GNU Public License -# Version: 2.2 + +my $VERSION = '2.2'; use strict; use Cwd qw(abs_path); -- 2.51.2