From 9dbc50fb6f478fd490a2639a1bb0edb1c113de01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 18 Sep 2008 16:06:21 +0300 Subject: [PATCH] Add initial git-svn support --- update.sh | 15 +++++++++++++-- variables | 8 ++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/update.sh b/update.sh index 552271f..5930f22 100755 --- a/update.sh +++ b/update.sh @@ -37,12 +37,23 @@ if [ ! $MSGINIT ]; then exit 1 fi +SVN="$SVN co" + +if [ $GIT ] && [ ! $GITSVN ]; then + echo -e "\E[31mgit-svn is unavailable. svn will be used."; tput sgr0 + GIT=0 +fi + +if [ $GIT ] && [ $GITSVN ]; then + SVN="$GITSVN clone" +fi + echo -e "Language: \E[31m$LCODE"; tput sgr0 echo "" if [ ! -z $TRUNK ]; then echo -e "Updating repository: \E[34mtrunk" - $SVN co "$REPO/$TRUNK/po" $TRUNK + $SVN "$REPO/$TRUNK/po" $TRUNK tput sgr0 if [ ! -e "$PREFIX-$TRUNK" ]; then mkdir "$PREFIX-$TRUNK" @@ -51,7 +62,7 @@ fi for BRANCH in $BRANCHES; do echo -e "Updating repository: \E[34m$BRANCH" - $SVN co "$REPO/branches/$BRANCH/po" $BRANCH + $SVN "$REPO/branches/$BRANCH/po" $BRANCH tput sgr0 done diff --git a/variables b/variables index 37a8424..abd02c1 100644 --- a/variables +++ b/variables @@ -19,8 +19,11 @@ LCODE="lt" # Language code. Only 1 language is supported. # Repositories REPO="http://svn.gna.org/svn/wesnoth" -BRANCHES="1.4" # one or multiple branches separated by space. Can be blank. -TRUNK="" # "trunk" or "" +BRANCHES="" # one or multiple branches separated by space. Can be blank. +TRUNK="trunk" # "trunk" or "" + +# Options +GIT=1 # Enable (1) or disable (0) git-svn #Paths MDIR="mo" @@ -35,3 +38,4 @@ ISUTF8=`which isutf8 2> /dev/null` TAR=`which tar 2> /dev/null` BZIP2=`which bzip2 2> /dev/null` DIFF=`which diff 2> /dev/null` +GITSVN=`which git-svn 2> /dev/null`