summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-13 18:11:11 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-13 18:11:11 +0300
commitb5feb842e78cb85e2282c38f07b75fed07997957 (patch)
tree81f004a8c3dc341046e9df694c2282586f34c3f9 /tools
parent2390d257d3bd8efcdec33e318fd5d87fbea140a4 (diff)
downloadevol-hercules-b5feb842e78cb85e2282c38f07b75fed07997957.tar.gz
evol-hercules-b5feb842e78cb85e2282c38f07b75fed07997957.tar.bz2
evol-hercules-b5feb842e78cb85e2282c38f07b75fed07997957.tar.xz
evol-hercules-b5feb842e78cb85e2282c38f07b75fed07997957.zip
Add support for local mirror if running in local runner.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci/scripts/init.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh
index 2edc758..d641cdf 100755
--- a/tools/ci/scripts/init.sh
+++ b/tools/ci/scripts/init.sh
@@ -15,6 +15,22 @@ function do_init {
ln -s evol-hercules server-plugin
}
+function update_repos {
+ if [ "$CI_SERVER" == "" ];
+ then
+ return
+ fi
+
+ export DATA=$(cat /etc/resolv.conf|grep "nameserver 1.10.100.101")
+ 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
+ else
+ echo "Detected non local runner"
+ fi
+}
+
function aptget_update {
echo "apt-get update"
apt-get update
@@ -151,4 +167,5 @@ function build_init {
check_error $?
}
+update_repos
aptget_update