From bf2638206182dc22d3df78c9b45c0389a7e1bb84 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 22 Jun 2016 19:06:31 +0300 Subject: Allow clone mplint from fork at first and if it missing from original manaplus repo. --- tools/ci/scripts/init.sh | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'tools/ci/scripts/init.sh') diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh index f26c6ea48..61f2294d4 100755 --- a/tools/ci/scripts/init.sh +++ b/tools/ci/scripts/init.sh @@ -93,26 +93,41 @@ function aptget_install { fi } +function gitclone1 { + echo git clone $2 + git clone $2 + if [ "$?" != 0 ]; then + echo git clone $1 + git clone $1 + return $? + fi + return $? +} + function gitclone { - git clone $* + export name1=$1/$2 + export name2=${CI_BUILD_REPO##*@} + export name2=https://${name2%/*}/$2 + + gitclone1 "$name1" "$name2" if [ "$?" != 0 ]; then sleep 1s - git clone $* + gitclone1 "$name1" "$name2" if [ "$?" != 0 ]; then sleep 3s - git clone $* + gitclone1 "$name1" "$name2" if [ "$?" != 0 ]; then sleep 5s - git clone $* + gitclone1 "$name1" "$name2" if [ "$?" != 0 ]; then sleep 10s - git clone $* + gitclone1 "$name1" "$name2" if [ "$?" != 0 ]; then sleep 15s - git clone $* + gitclone1 "$name1" "$name2" if [ "$?" != 0 ]; then sleep 20s - git clone $* + gitclone1 "$name1" "$name2" fi fi fi -- cgit v1.2.3-70-g09d2