From: Marek Marczykowski <marmarek@invisiblethingslab.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: Sander Eikelenboom <linux@eikelenboom.it>,
Marek Marczykowski <marmarek@invisiblethingslab.com>,
Keir Fraser <keir@xen.org>,
Ian Campbell <ian.campbell@citrix.com>,
xen-devel@lists.xen.org
Subject: [PATCH] Cleanup scmversion script, fix --save-scmversion option
Date: Mon, 13 May 2013 20:23:54 +0200 [thread overview]
Message-ID: <1368469434-16467-1-git-send-email-marmarek@invisiblethingslab.com> (raw)
In-Reply-To: <51912F7E.20508@invisiblethingslab.com>
Remove unused variable, fix erroneously removed --save-scmversion code.
Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
---
xen/tools/scmversion | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/xen/tools/scmversion b/xen/tools/scmversion
index 219d898..b0c3b95 100755
--- a/xen/tools/scmversion
+++ b/xen/tools/scmversion
@@ -16,10 +16,10 @@ usage() {
exit 1
}
-scm_only=false
+save_scm=false
srctree=.
if test "$1" = "--save-scmversion"; then
- scm_only=true
+ save_scm=true
shift
fi
if test $# -gt 0; then
@@ -32,17 +32,10 @@ fi
scm_version()
{
- local short
- short=false
-
- cd "$srctree"
if test -e .scmversion; then
cat .scmversion
return
fi
- if test "$1" = "--short"; then
- short=true
- fi
# Check for git and a git repo.
if test -d .git && head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
@@ -98,4 +91,8 @@ cd $srctree
# full scm version string
res="$(scm_version)"
+if [ "$save_scm" = "true" ]; then
+ echo $res > .scmversion
+fi
+
echo "$res"
--
1.8.1.4
next prev parent reply other threads:[~2013-05-13 18:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 15:15 [PATCH v3] Try to use git commit id if hg changeset is unavailable Marek Marczykowski
2013-05-08 15:45 ` Ian Campbell
2013-05-08 19:16 ` Marek Marczykowski
2013-05-08 23:07 ` [PATCH v4] Use {git, hg, svn} commit id if available for xen_changeset Marek Marczykowski
2013-05-10 13:29 ` Ian Campbell
2013-05-10 13:33 ` Andrew Cooper
2013-05-13 9:49 ` Ian Campbell
2013-05-13 11:43 ` Keir Fraser
2013-05-13 11:52 ` Ian Campbell
2013-05-13 13:39 ` Ian Campbell
2013-05-13 13:52 ` [PATCH v3] Try to use git commit id if hg changeset is unavailable Olaf Hering
2013-05-13 18:22 ` Marek Marczykowski
2013-05-13 18:23 ` Marek Marczykowski [this message]
2013-05-14 8:50 ` [PATCH] Cleanup scmversion script, fix --save-scmversion option Ian Campbell
2013-07-04 9:56 ` Ian Campbell
2013-07-17 10:36 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1368469434-16467-1-git-send-email-marmarek@invisiblethingslab.com \
--to=marmarek@invisiblethingslab.com \
--cc=ian.campbell@citrix.com \
--cc=keir@xen.org \
--cc=linux@eikelenboom.it \
--cc=olaf@aepfle.de \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).