diff options
Diffstat (limited to '.tools/init.sh')
-rwxr-xr-x | .tools/init.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.tools/init.sh b/.tools/init.sh index 99f85e70..18e8dac7 100755 --- a/.tools/init.sh +++ b/.tools/init.sh @@ -20,7 +20,24 @@ function gitclone { check_error $? } +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 { + update_repos apt-get update if [ "$?" != 0 ]; then sleep 1s |