Browse Source

Fix git-svn rebase

master
Andrius Štikonas 11 years ago
parent
commit
7c99cfc290
1 changed files with 38 additions and 9 deletions
  1. +38
    -9
      update.sh

+ 38
- 9
update.sh View 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

Loading…
Cancel
Save