Fix git-svn rebase

This commit is contained in:
Andrius Štikonas 2008-09-18 23:33:25 +03:00
parent 9dbc50fb6f
commit 7c99cfc290
1 ha cambiato i file con 38 aggiunte e 9 eliminazioni

Vedi File

@ -37,8 +37,6 @@ 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
@ -52,8 +50,25 @@ echo -e "Language: \E[31m$LCODE"; tput sgr0
echo ""
if [ ! -z $TRUNK ]; then
echo -e "Updating repository: \E[34mtrunk"
$SVN "$REPO/$TRUNK/po" $TRUNK
if [ -e $TRUNK/.git] || [ -e $TRUNK/.svn ]; then
echo -e "Updating repository: \E[34mtrunk"
if [ $GIT ] && [ $GITSVN ]; then
SVN="$GITSVN rebase"
else
SVN="$SVN update"
fi
cd $TRUNK
$SVN "$REPO/$TRUNK/po"
cd ..
else
echo -e "Downloading repository: \E[34mtrunk"
if [ $GIT ] && [ $GITSVN ]; then
SVN="$GITSVN clone"
else
SVN="$SVN checkout"
fi
$SVN "$REPO/$TRUNK/po" $TRUNK
fi
tput sgr0
if [ ! -e "$PREFIX-$TRUNK" ]; then
mkdir "$PREFIX-$TRUNK"
@ -61,12 +76,26 @@ if [ ! -z $TRUNK ]; then
fi
for BRANCH in $BRANCHES; do
echo -e "Updating repository: \E[34m$BRANCH"
$SVN "$REPO/branches/$BRANCH/po" $BRANCH
if [ -e $BRANCH/.git] || [ -e $BRANCH/.svn ]; then
echo -e "Updating repository: \E[34m$BRANCH"
if [ $GIT ] && [ $GITSVN ]; then
SVN="$GITSVN rebase"
else
SVN="$SVN update"
fi
cd $BRANCH
$SVN "$REPO/$BRANCH/po"
cd ..
else
echo -e "Downloading repository: \E[34m$BRANCH"
if [ $GIT ] && [ $GITSVN ]; then
SVN="$GITSVN clone"
else
SVN="$SVN checkout"
fi
$SVN "$REPO/$BRANCH/po" $BRANCH
fi
tput sgr0
done
for BRANCH in $BRANCHES; do
if [ ! -e "$PREFIX-$BRANCH" ]; then
mkdir "$PREFIX-$BRANCH"
fi