aboutsummaryrefslogtreecommitdiffstats
path: root/xen/tools
diff options
context:
space:
mode:
authorMarek Marczykowski <marmarek@invisiblethingslab.com>2013-05-13 20:23:54 +0200
committerIan Campbell <ian.campbell@citrix.com>2013-07-17 10:42:42 +0100
commit26b48cf251c6ce39c07462b833d33195c172466b (patch)
treef2e643a19003d68ff9a13f46ccaed739643b2804 /xen/tools
parent4d1759b5153ce5b0903e56fefcfdca8a03b7c246 (diff)
downloadxen-26b48cf251c6ce39c07462b833d33195c172466b.tar.gz
xen-26b48cf251c6ce39c07462b833d33195c172466b.tar.bz2
xen-26b48cf251c6ce39c07462b833d33195c172466b.zip
Cleanup scmversion script, fix --save-scmversion option
Remove unused variable, fix erroneously removed --save-scmversion code. Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
Diffstat (limited to 'xen/tools')
-rwxr-xr-xxen/tools/scmversion15
1 files changed, 6 insertions, 9 deletions
diff --git a/xen/tools/scmversion b/xen/tools/scmversion
index 219d898803..b0c3b952f6 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"