File: get-branch

package info (click to toggle)
cortado 0.2.2-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,232 kB
  • ctags: 2,515
  • sloc: java: 17,356; xml: 532; sh: 58; makefile: 15
file content (15 lines) | stat: -rwxr-xr-x 316 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

scriptsdir=`dirname $0`
topsrcdir=`cd $scriptsdir/.. && pwd`

if test ! -e $topsrcdir/.svn
then
  echo "(unknown)"
  exit 0
fi

URL=`svn info $topsrcdir/ChangeLog | grep URL | sed 's/URL: //g'`
# we consider the directory right before top-level ChangeLog to be the
# branch name
basename `dirname $URL`