{"thread":{"id":"1733","subject":"[PATCH] Add the git-version-script.","startedAt":"2005-09-05T18:38:48Z","lastAt":"2005-09-05T18:38:48Z","messageCount":1,"participants":["Martin Atukunda"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"8103","messageId":"11259455282831-git-send-email-matlads@ds.co.ug","threadId":"1733","inReplyTo":null,"subject":"[PATCH] Add the git-version-script.","fromName":"Martin Atukunda","fromEmail":"matlads@ds.co.ug","sentAt":"2005-09-05T18:38:48Z","receivedAt":"2005-09-05T18:38:48Z","isPatch":true,"sender":{"key":"matlads@ds.co.ug","avatar":null},"body":"This script simply reports the version of git you have installed.\n\nSigned-off-by: Martin Atukunda <matlads@ds.co.ug>\n\n---\n\n Documentation/git-version-script.txt |   36 ++++++++++++++++++++++++++++++++++\n Makefile                             |    9 +++++++--\n git-version-script.in                |    9 +++++++++\n 3 files changed, 52 insertions(+), 2 deletions(-)\n create mode 100644 Documentation/git-version-script.txt\n create mode 100644 git-version-script.in\n\nc0ef77fa3fdf8edcce51f3ed32f5ec5b96f6db63\ndiff --git a/Documentation/git-version-script.txt b/Documentation/git-version-script.txt\nnew file mode 100644\n--- /dev/null\n+++ b/Documentation/git-version-script.txt\n@@ -0,0 +1,36 @@\n+git-version-script(1)\n+===================\n+v0.99.5, Aug 2005\n+\n+NAME\n+----\n+git-version-script - Prints the current version of git\n+\n+\n+SYNOPSIS\n+--------\n+'git-version-script'\n+\n+DESCRIPTION\n+-----------\n+\n+This simple script simply prints the version of git you are currently\n+running. The version is generated at release time, and stored in the script\n+for later use.\n+\n+OPTIONS\n+-------\n+This program takes no options\n+\n+Author\n+------\n+Written by Martin Atukunda <matlads@dsmagic.com>\n+\n+Documentation\n+--------------\n+Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.\n+\n+GIT\n+---\n+Part of the link:git.html[git] suite\n+\ndiff --git a/Makefile b/Makefile\n--- a/Makefile\n+++ b/Makefile\n@@ -66,7 +66,7 @@ SCRIPTS=git git-merge-one-file-script gi\n \tgit-format-patch-script git-sh-setup-script git-push-script \\\n \tgit-branch-script git-parse-remote-script git-verify-tag-script \\\n \tgit-ls-remote-script git-clone-dumb-http git-rename-script \\\n-\tgit-request-pull-script git-bisect-script\n+\tgit-request-pull-script git-bisect-script git-version-script\n \n SCRIPTS += git-count-objects-script\n SCRIPTS += git-revert-script\n@@ -230,8 +230,12 @@ install-doc:\n git-core.spec: git-core.spec.in Makefile\n \tsed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@\n \n+git-version-script: git-version-script.in Makefile\n+\tsed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@\n+\tchmod +x $@\n+\n GIT_TARNAME=git-core-$(GIT_VERSION)\n-dist: git-core.spec git-tar-tree\n+dist: git-core.spec git-version-script git-tar-tree\n \t./git-tar-tree HEAD $(GIT_TARNAME) > $(GIT_TARNAME).tar\n \t@mkdir -p $(GIT_TARNAME)\n \t@cp git-core.spec $(GIT_TARNAME)\n@@ -253,6 +257,7 @@ deb: dist\n clean:\n \trm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE)\n \trm -f git-core.spec\n+\trm -f git-version-script\n \trm -rf $(GIT_TARNAME)\n \trm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz\n \trm -f git-core_$(GIT_VERSION)-*.deb git-core_$(GIT_VERSION)-*.dsc\ndiff --git a/git-version-script.in b/git-version-script.in\nnew file mode 100644\n--- /dev/null\n+++ b/git-version-script.in\n@@ -0,0 +1,9 @@\n+#!/bin/sh\n+\n+. git-sh-setup-script || die \"Not a git archive\"\n+\n+dryrun=\n+echo=\n+\n+echo git version @@VERSION@@\n+\n"}]}