fix make VERSION=x.y to work again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28427 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
77b2d02296
commit
308936cd35
1 changed files with 19 additions and 16 deletions
|
@ -90,24 +90,27 @@ bzrversion() {
|
||||||
#
|
#
|
||||||
if [ -n "$1" ]; then TOP=$1; else TOP=..; fi
|
if [ -n "$1" ]; then TOP=$1; else TOP=..; fi
|
||||||
|
|
||||||
# If the VERSIONFILE exisits we use that
|
# setting VERSION var on commandline has precedence
|
||||||
VERSIONFILE=docs/VERSION
|
if [ -z $VERSION ]; then
|
||||||
if [ -r $TOP/$VERSIONFILE ]; then VER=`cat $TOP/$VERSIONFILE`;
|
# If the VERSIONFILE exisits we use that
|
||||||
else
|
VERSIONFILE=docs/VERSION
|
||||||
# Ok, we need to derive it from the Version Control system
|
if [ -r $TOP/$VERSIONFILE ]; then VER=`cat $TOP/$VERSIONFILE`;
|
||||||
if [ -d "$TOP/.git" ]; then
|
|
||||||
VER=`gitversion $TOP`
|
|
||||||
elif [ -d "$TOP/.bzr" ]; then
|
|
||||||
VER=`bzrversion $TOP`
|
|
||||||
else
|
else
|
||||||
VER=`svnversion_safe $TOP`;
|
# Ok, we need to derive it from the Version Control system
|
||||||
if [ "$VER" = "unknown" ]; then
|
if [ -d "$TOP/.git" ]; then
|
||||||
# try getting it from a subdir to test if perhaps they are symlinked
|
VER=`gitversion $TOP`
|
||||||
# from the root
|
elif [ -d "$TOP/.bzr" ]; then
|
||||||
VER=`svnversion_safe $TOP/tools`;
|
VER=`bzrversion $TOP`
|
||||||
fi
|
else
|
||||||
|
VER=`svnversion_safe $TOP`;
|
||||||
|
if [ "$VER" = "unknown" ]; then
|
||||||
|
# try getting it from a subdir to test if perhaps they are symlinked
|
||||||
|
# from the root
|
||||||
|
VER=`svnversion_safe $TOP/tools`;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
VERSION=$VER-`date -u +%y%m%d`
|
VERSION=$VER-`date -u +%y%m%d`
|
||||||
|
fi
|
||||||
echo $VERSION
|
echo $VERSION
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue