git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Add the git-version-script.
@ 2005-09-05 18:38 Martin Atukunda
  0 siblings, 0 replies; only message in thread
From: Martin Atukunda @ 2005-09-05 18:38 UTC (permalink / raw)
  To: git; +Cc: Martin Atukunda

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

Signed-off-by: Martin Atukunda <matlads@ds.co.ug>

---

 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 <matlads@dsmagic.com>
+
+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@@
+

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-05 18:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-05 18:38 [PATCH] Add the git-version-script Martin Atukunda

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).