3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 # Usage: svnversion.sh [source-root]
13 VERSIONFILE
=docs
/VERSION
14 if [ -n "$1" ]; then TOP
=$1; else TOP
=..
; fi
15 if [ -r $TOP/$VERSIONFILE ]; then SVNVER
=`cat $TOP/$VERSIONFILE`;
16 else if [ `which svnversion 2>/dev/null` ]; then
17 SVNALT
=`svnversion $1`;
18 if [ "$SVNALT" = "exported" ]; then
19 # try getting it from a subdir to test if perhaps they are symlinked
21 SVNALT
=`svnversion $1/tools`
22 if [ "$SVNALT" != exported
]; then
23 # yeah, it is there so we use this
31 else SVNVER
="unknown"; fi
33 VERSION
=$SVNVER-`date -u +%y%m%d`