This script simply reports the version of git you have installed.

Signed-off-by: Martin Atukunda <[EMAIL PROTECTED]>

---

 Documentation/git-version-script.txt |   36 ++++++++++++++++++++++++++++++++++
 Makefile                             |    9 +++++++--
 git-version-script.in                |    9 +++++++++
 3 files changed, 52 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/git-version-script.txt
 create mode 100644 git-version-script.in

c0ef77fa3fdf8edcce51f3ed32f5ec5b96f6db63
diff --git a/Documentation/git-version-script.txt 
b/Documentation/git-version-script.txt
new file mode 100644
--- /dev/null
+++ b/Documentation/git-version-script.txt
@@ -0,0 +1,36 @@
+git-version-script(1)
+===================
+v0.99.5, Aug 2005
+
+NAME
+----
+git-version-script - Prints the current version of git
+
+
+SYNOPSIS
+--------
+'git-version-script'
+
+DESCRIPTION
+-----------
+
+This simple script simply prints the version of git you are currently
+running. The version is generated at release time, and stored in the script
+for later use.
+
+OPTIONS
+-------
+This program takes no options
+
+Author
+------
+Written by Martin Atukunda <[EMAIL PROTECTED]>
+
+Documentation
+--------------
+Documentation by David Greaves, Junio C Hamano and the git-list 
<git@vger.kernel.org>.
+
+GIT
+---
+Part of the link:git.html[git] suite
+
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -66,7 +66,7 @@ SCRIPTS=git git-merge-one-file-script gi
        git-format-patch-script git-sh-setup-script git-push-script \
        git-branch-script git-parse-remote-script git-verify-tag-script \
        git-ls-remote-script git-clone-dumb-http git-rename-script \
-       git-request-pull-script git-bisect-script
+       git-request-pull-script git-bisect-script git-version-script
 
 SCRIPTS += git-count-objects-script
 SCRIPTS += git-revert-script
@@ -230,8 +230,12 @@ install-doc:
 git-core.spec: git-core.spec.in Makefile
        sed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@
 
+git-version-script: git-version-script.in Makefile
+       sed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@
+       chmod +x $@
+
 GIT_TARNAME=git-core-$(GIT_VERSION)
-dist: git-core.spec git-tar-tree
+dist: git-core.spec git-version-script git-tar-tree
        ./git-tar-tree HEAD $(GIT_TARNAME) > $(GIT_TARNAME).tar
        @mkdir -p $(GIT_TARNAME)
        @cp git-core.spec $(GIT_TARNAME)
@@ -253,6 +257,7 @@ deb: dist
 clean:
        rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE)
        rm -f git-core.spec
+       rm -f git-version-script
        rm -rf $(GIT_TARNAME)
        rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
        rm -f git-core_$(GIT_VERSION)-*.deb git-core_$(GIT_VERSION)-*.dsc
diff --git a/git-version-script.in b/git-version-script.in
new file mode 100644
--- /dev/null
+++ b/git-version-script.in
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+. git-sh-setup-script || die "Not a git archive"
+
+dryrun=
+echo=
+
+echo git version @@VERSION@@
+


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to