[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] git-version-gen: allow empty string as --prefix

From: Sami Kerola
Subject: [PATCH] git-version-gen: allow empty string as --prefix
Date: Sat, 11 Feb 2017 16:15:29 +0000

There are projects that try use this script, but do not have convention to
use 'v' in front of tags.  Earlier one had to change script default not to
include 'v'.  After this change the --prefix option can be used as last
argument without options in AC_INIT() to achieve the same.
 build-aux/git-version-gen | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 079849d5e..f493d8157 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -101,7 +101,7 @@ while test $# -gt 0; do
   case $1 in
     --help) echo "$usage"; exit 0;;
     --version) echo "$version"; exit 0;;
-    --prefix) shift; prefix=${1?};;
+    --prefix) shift; prefix="${1:-''}";;
     --fallback) shift; fallback=${1?};;
       echo "$0: Unknown option '$1'." >&2

reply via email to

[Prev in Thread] Current Thread [Next in Thread]