2 REVISION=$(echo '$Revision: 1053 $' | sed -e 's,\$,,g' -e 's,^\w*:\s,,' )
4 BUILD_SCM_URL="http://svn.planet-lab.org/svn/build/trunk"
7 # scan args for any -s option, and set BUILD_SCM_URL in this case
8 function scan_build_scm_url () {
9 while [[ -n "$@" ]] ; do
10 if [ "$1" == "-s" ] ; then
17 if echo $BUILD_SCM_URL | grep -q git ; then USE_GIT="true" ; fi
19 if [ -n "$USE_GIT" ] ; then
20 GIT_REPO=$(echo $BUILD_SCM_URL | cut -d@ -f1)
21 GIT_TAG=$(echo $BUILD_SCM_URL | cut -s -d@ -f2)
22 GIT_TAG=${GIT_TAG:-master}
26 scan_build_scm_url "$@"
29 if [ -n "$USE_GIT" ] ; then
30 git archive --remote=$GIT_REPO $GIT_TAG $COMMAND | tar -C /tmp -xf -
33 svn cat $BUILD_SCM_URL/$COMMAND > $tmp