summaryrefslogtreecommitdiff
path: root/tools/ci/scripts
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-11 22:19:12 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-11 22:19:12 +0300
commite17646d427bc5c56836b178bcdb5ba6cd34217f4 (patch)
treef61940230763a854c28cb0ae4a82ce2906126e3e /tools/ci/scripts
parentf791f3b8ec8f784c4c04249d4b5e3fba87751829 (diff)
downloadManaVerse-e17646d427bc5c56836b178bcdb5ba6cd34217f4.tar.gz
ManaVerse-e17646d427bc5c56836b178bcdb5ba6cd34217f4.tar.bz2
ManaVerse-e17646d427bc5c56836b178bcdb5ba6cd34217f4.tar.xz
ManaVerse-e17646d427bc5c56836b178bcdb5ba6cd34217f4.zip
In ci scripts use local debian mirror if run on local runner.
Diffstat (limited to 'tools/ci/scripts')
-rwxr-xr-xtools/ci/scripts/init.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh
index fa407371b..b64fa7fb1 100755
--- a/tools/ci/scripts/init.sh
+++ b/tools/ci/scripts/init.sh
@@ -17,6 +17,16 @@ function do_init {
check_error $?
}
+function update_repos {
+ export DATA=$(cat /etc/resolv.conf|grep "nameserver 1.10.100.101")
+ echo "${DATA}"
+ if [ "$DATA" != "" ];
+ then
+ echo "Detected local runner"
+ sed -i 's!http://httpredir.debian.org/debian!http://1.10.100.103/debian!' /etc/apt/sources.list
+ fi
+}
+
function aptget_update {
echo "apt-get update"
apt-get update
@@ -210,4 +220,5 @@ function run_mplint {
run_check_warnings
}
+update_repos
aptget_update