if a proxy is set, pre-fill the proxy setting dialog with the old value.
[Rockbox.git] / tools / svnversion.sh
blobf30d4193ebebe50529664cc02290336570eb44c5
1 #!/bin/sh
2 # __________ __ ___.
3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # \/ \/ \/ \/ \/
8 # $Id$
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
20 # from the root
21 SVNALT=`svnversion $1/tools`
22 if [ "$SVNALT" != exported ]; then
23 # yeah, it is there so we use this
24 SVNVER="r$SVNALT"
25 else
26 SVNALT="unknown";
28 else
29 SVNVER="r$SVNALT";
31 else SVNVER="unknown"; fi
33 VERSION=$SVNVER-`date -u +%y%m%d`
34 echo $VERSION