X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fvbuild-nightly.sh;h=10c72a521d4e096c4e9ed83d11a440787d6bd8e3;hb=60fad67a4f25c8c514854cb7fe4f3cb6d01b6646;hp=512e331ac9f01bf70e99f86ce9e9579fd0f3e0b2;hpb=b4fff6e9ee95bdea4ca422bd94e3a652003d5288;p=infrastructure.git diff --git a/scripts/vbuild-nightly.sh b/scripts/vbuild-nightly.sh index 512e331..10c72a5 100755 --- a/scripts/vbuild-nightly.sh +++ b/scripts/vbuild-nightly.sh @@ -1,8 +1,6 @@ #!/bin/bash -REVISION=$(echo '$Revision: 1053 $' | sed -e 's,\$,,g' -e 's,^\w*:\s,,' ) COMMAND=$(basename $0) -BUILD_SCM_URL="http://svn.planet-lab.org/svn/build/trunk" -USE_GIT="" +BUILD_SCM_URL="git://git.onelab.eu/build" # scan args for any -s option, and set BUILD_SCM_URL in this case function scan_build_scm_url () { @@ -13,25 +11,16 @@ function scan_build_scm_url () { shift done - # is this a git url ? - if echo $BUILD_SCM_URL | grep -q git ; then USE_GIT="true" ; fi - - if [ -n "$USE_GIT" ] ; then - GIT_REPO=$(echo $BUILD_SCM_URL | cut -d@ -f1) - GIT_TAG=$(echo $BUILD_SCM_URL | cut -s -d@ -f2) - GIT_TAG=${GIT_TAG:-master} - fi + GIT_REPO=$(echo $BUILD_SCM_URL | cut -d@ -f1) + GIT_TAG=$(echo $BUILD_SCM_URL | cut -s -d@ -f2) + GIT_TAG=${GIT_TAG:-master} } scan_build_scm_url "$@" tmp=/tmp/$COMMAND-$$ -if [ -n "$USE_GIT" ] ; then - git archive --remote=$GIT_REPO $GIT_TAG $COMMAND | tar -C /tmp -xf - - mv /tmp/$COMMAND $tmp -else - svn cat $BUILD_SCM_URL/$COMMAND > $tmp -fi +git archive --remote=$GIT_REPO $GIT_TAG $COMMAND | tar -C /tmp -xf - +mv /tmp/$COMMAND $tmp chmod +x $tmp $tmp "$@" rm $tmp