diff options
author | Jim Meyering <meyering@redhat.com> | 2007-10-22 21:43:12 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2007-10-22 21:43:12 +0200 |
commit | 433a31d3dc1831b9e0691b4de03cc7f975a63f8c (patch) | |
tree | a68dcac7ea46d9dfb53909947a582fb0c7ee8271 /build-aux | |
parent | 74695771cb4373349cb6a936f93f1f335ee78016 (diff) | |
download | coreutils-433a31d3dc1831b9e0691b4de03cc7f975a63f8c.tar.xz |
Remove git-version-gen's first parameter.
* build-aux/git-version-gen: Add comments.
Remove first command-line parameter.
* configure.ac: Remove corresponding first argument.
* GNUmakefile (_curr-ver): Likewise.
Diffstat (limited to 'build-aux')
-rwxr-xr-x | build-aux/git-version-gen | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index a3e95aca6..c433c262d 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -1,14 +1,18 @@ #!/bin/sh # Print a version string. # This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. +# It may be run two ways: +# - from a git repository in which the git-describe command below +# produces useful output (thus requiring at least one signed tag) +# - from a non-git-repo directory containing a .version file, which +# presumes this script is invoked like "./git-version-gen .version". case $# in - 2) ;; - *) echo 1>&2 "Usage: $0 \$VERSION \$srcdir/.version"; exit 1;; + 1) ;; + *) echo 1>&2 "Usage: $0 \$srcdir/.version"; exit 1;; esac -default_version=$1 -tarball_version_file=$2 +tarball_version_file=$1 nl=' ' @@ -41,7 +45,7 @@ then # Remove the "g" in git-describe's output string. v=`echo "$v" | sed 's/\(.*\)-g/\1-/'`; else - v=$default_version + v=UNKNOWN fi v=`echo "$v" |sed 's/^v//'` |