Fixes for BSD. Thanks to Lutz Böhne.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12421 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
12bf62524d
commit
3d2e5c6dc4
1 changed files with 9 additions and 7 deletions
|
@ -1,11 +1,11 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
# __________ __ ___.
|
||||
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
# \/ \/ \/ \/ \/
|
||||
# $Id:$
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# Usage: svnversion.sh [source-root]
|
||||
|
@ -13,18 +13,20 @@
|
|||
VERSIONFILE=docs/VERSION
|
||||
if [ -n "$1" ]; then TOP=$1; else TOP=..; fi
|
||||
if [ -r $TOP/$VERSIONFILE ]; then SVNVER=`cat $TOP/$VERSIONFILE`;
|
||||
else if [ `which svnversion 2>/dev/null` ];
|
||||
then SVNVER=r`svnversion $1`;
|
||||
if [ $SVNVER = "rexported" ]; then
|
||||
else if [ `which svnversion 2>/dev/null` ]; then
|
||||
SVNALT=`svnversion $1`;
|
||||
if [ "$SVNALT" = "exported" ]; then
|
||||
# try getting it from a subdir to test if perhaps they are symlinked
|
||||
# from the root
|
||||
SVNALT=`svnversion $1/tools`
|
||||
if [ $SVNALT != exported ]; then
|
||||
if [ "$SVNALT" != exported ]; then
|
||||
# yeah, it is there so we use this
|
||||
SVNVER="r$SVNALT"
|
||||
else
|
||||
SVNVER=unknown;
|
||||
SVNALT="unknown";
|
||||
fi
|
||||
else
|
||||
SVNVER="r$SVNALT";
|
||||
fi
|
||||
else SVNVER="unknown"; fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue