summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2007-10-22 21:43:12 +0200
committerJim Meyering <meyering@redhat.com>2007-10-22 21:43:12 +0200
commit433a31d3dc1831b9e0691b4de03cc7f975a63f8c (patch)
treea68dcac7ea46d9dfb53909947a582fb0c7ee8271 /build-aux
parent74695771cb4373349cb6a936f93f1f335ee78016 (diff)
downloadcoreutils-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-xbuild-aux/git-version-gen14
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//'`