summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-02-20 23:01:25 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-02-20 23:01:25 +0000
commit3d2e5c6dc47c6b1003edb1addd5e24d7feb62a2b (patch)
tree36843c63e21f62b8404a15497c65603de2d8e6d9 /tools
parent12bf62524da2f1cf61cb016cf266a8359e11f3f6 (diff)
downloadrockbox-3d2e5c6dc47c6b1003edb1addd5e24d7feb62a2b.tar.gz
rockbox-3d2e5c6dc47c6b1003edb1addd5e24d7feb62a2b.tar.bz2
rockbox-3d2e5c6dc47c6b1003edb1addd5e24d7feb62a2b.zip
Fixes for BSD. Thanks to Lutz Böhne.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12421 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/svnversion.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/svnversion.sh b/tools/svnversion.sh
index bbe1c0eb66..f30d4193eb 100755
--- a/tools/svnversion.sh
+++ b/tools/svnversion.sh
@@ -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