3 BUILD_SCM_URL="git://git.onelab.eu/build"
6 # scan args for any -s option, and set BUILD_SCM_URL in this case
7 function scan_build_scm_url () {
8 while [[ -n "$@" ]] ; do
9 if [ "$1" == "-s" ] ; then
16 if echo $BUILD_SCM_URL | grep -q git ; then USE_GIT="true" ; fi
18 if [ -n "$USE_GIT" ] ; then
19 GIT_REPO=$(echo $BUILD_SCM_URL | cut -d@ -f1)
20 GIT_TAG=$(echo $BUILD_SCM_URL | cut -s -d@ -f2)
21 GIT_TAG=${GIT_TAG:-master}
25 scan_build_scm_url "$@"
28 if [ -n "$USE_GIT" ] ; then
29 git archive --remote=$GIT_REPO $GIT_TAG $COMMAND | tar -C /tmp -xf -
32 svn cat $BUILD_SCM_URL/$COMMAND > $tmp