[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] Cleanup scmversion script, fix --save-scmversion option



commit 26b48cf251c6ce39c07462b833d33195c172466b
Author:     Marek Marczykowski <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
AuthorDate: Mon May 13 20:23:54 2013 +0200
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Wed Jul 17 10:42:42 2013 +0100

    Cleanup scmversion script, fix --save-scmversion option
    
    Remove unused variable, fix erroneously removed --save-scmversion code.
    
    Signed-off-by: Marek Marczykowski <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
---
 xen/tools/scmversion |   15 ++++++---------
 1 files 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"
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.