From e17646d427bc5c56836b178bcdb5ba6cd34217f4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 11 Jun 2016 22:19:12 +0300 Subject: In ci scripts use local debian mirror if run on local runner. --- tools/ci/scripts/init.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tools/ci/scripts') 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 -- cgit v1.2.3-70-g09d2