Detect branch better. Don't forget to clean autorevision.h in core.
authorKonstantin Dmitriev <ksee.zelgadis@gmail.com>
Sat, 25 Jul 2009 03:08:58 +0000 (10:08 +0700)
committerKonstantin Dmitriev <ksee.zelgadis@gmail.com>
Sat, 25 Jul 2009 03:08:58 +0000 (10:08 +0700)
synfig-core/trunk/build_tools/autorevision.sh
synfig-studio/trunk/build_tools/autorevision.sh

index c7a1919..c8f4cf2 100644 (file)
@@ -22,7 +22,7 @@ get_git_id(){
                BRANCH='master'
        else
                BRANCH=`echo $BRANCH | cut -d ' ' -f 1`
-               BRANCH=${BRANCH#*/}
+               BRANCH=${BRANCH##*/}
        fi
        export REVISION=`git show --pretty=format:%ci HEAD |  head -c 10 | tr -d '-'`
        export COMPARE=`git rev-parse --git-dir`
@@ -103,5 +103,5 @@ fi
 
 # Output the header
 if [ x != "x$DEVEL_VERSION" ] ; then
-       printf "#define DEVEL_VERSION \"$DEVEL_VERSION\"\n" >> "$HEADER"
+       printf "#define DEVEL_VERSION \"$DEVEL_VERSION\"\n" > "$HEADER"
 fi
index de4a5b6..d8a5c8b 100644 (file)
@@ -22,7 +22,7 @@ get_git_id(){
                BRANCH='master'
        else
                BRANCH=`echo $BRANCH | cut -d ' ' -f 1`
-               BRANCH=${BRANCH#*/}
+               BRANCH=${BRANCH##*/}
        fi
        export REVISION=`git show --pretty=format:%ci HEAD |  head -c 10 | tr -d '-'`
        export COMPARE=`git rev-parse --git-dir`