diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-22 19:06:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-22 19:59:27 +0300 |
commit | bf2638206182dc22d3df78c9b45c0389a7e1bb84 (patch) | |
tree | 4af6b4a79b716233e2d78c423f92658cc7105a5e | |
parent | d2970b94701dbe728dcee0df89e10bd6077c07c6 (diff) | |
download | manaplus-bf2638206182dc22d3df78c9b45c0389a7e1bb84.tar.gz manaplus-bf2638206182dc22d3df78c9b45c0389a7e1bb84.tar.bz2 manaplus-bf2638206182dc22d3df78c9b45c0389a7e1bb84.tar.xz manaplus-bf2638206182dc22d3df78c9b45c0389a7e1bb84.zip |
Allow clone mplint from fork at first and if it missing from original manaplus repo.
-rwxr-xr-x | tools/ci/jobs/mplint.sh | 2 | ||||
-rwxr-xr-x | tools/ci/scripts/init.sh | 29 |
2 files changed, 23 insertions, 8 deletions
diff --git a/tools/ci/jobs/mplint.sh b/tools/ci/jobs/mplint.sh index c6ca9543d..4b28a3435 100755 --- a/tools/ci/jobs/mplint.sh +++ b/tools/ci/jobs/mplint.sh @@ -13,7 +13,7 @@ export CXXFLAGS="-std=gnu++11" do_init -gitclone https://gitlab.com/manaplus/mplint.git +gitclone https://gitlab.com/manaplus mplint.git cd mplint run_configure_simple run_make 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 |