#!/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"
+BUILD_SCM_URL="git://git.onelab.eu/build"
USE_GIT=""
# scan args for any -s option, and set BUILD_SCM_URL in this case
done
# is this a git url ?
- echo $BUILD_SCM_URL | grep -q git && USE_GIT="true"
+ if echo $BUILD_SCM_URL | grep -q git ; then USE_GIT="true" ; fi
if [ -n "$USE_GIT" ] ; then
- GITREPO=$(echo $BUILD_SCM_URL | cut -d@ -f1)
- GITTAG=$(echo $BUILD_SCM_URL | cut -s -d@ -f2)
- GITTAG=${GITTAG:-master}
+ 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
}
tmp=/tmp/$COMMAND-$$
if [ -n "$USE_GIT" ] ; then
- git archive --remote=$GITREPO $GITTAG $COMMAND | tar -C /tmp -xf -
+ git archive --remote=$GIT_REPO $GIT_TAG $COMMAND | tar -C /tmp -xf -
mv /tmp/$COMMAND $tmp
else
svn cat $BUILD_SCM_URL/$COMMAND > $tmp