summaryrefslogtreecommitdiffstats
path: root/bin/common-functions.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-08-04 14:01:22 +0200
committerHolger Levsen <holger@layer-acht.org>2015-08-04 14:01:22 +0200
commit005ed7eeea40a04ef7c8fccd2e51c0fe69bbaed8 (patch)
tree3765fceebd4a44f0f071011046160cae3ffba846 /bin/common-functions.sh
parentd4134b4ffcabcc9e3c16c8656e9838dc3c136403 (diff)
downloadjenkins.debian.net-005ed7eeea40a04ef7c8fccd2e51c0fe69bbaed8.tar.xz
reproducible: define mirror+proxy depending on the hostname
Diffstat (limited to 'bin/common-functions.sh')
-rwxr-xr-xbin/common-functions.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/common-functions.sh b/bin/common-functions.sh
index 3e081561..bde8f256 100755
--- a/bin/common-functions.sh
+++ b/bin/common-functions.sh
@@ -53,10 +53,18 @@ else
export LC_ALL=C.UTF-8
fi
if [ -z "$MIRROR" ]; then
- export MIRROR=http://ftp.de.debian.org/debian
+ case $HOSTNAME in
+ jenkins) export MIRROR=http://ftp.de.debian.org/debian ;;
+ bpi0|cbxi4pro0|hb0|wbq0) export MIRROR=http://ftp.de.debian.org/debian ;;
+ *) echo "unsupported host, exiting." ; exit 1 ;;
+ esac
fi
if [ -z "$http_proxy" ]; then
- export http_proxy="http://localhost:3128"
+ case $HOSTNAME in
+ jenkins) export http_proxy="http://localhost:3128" ;;
+ bpi0|cbxi4pro0|hb0|wbq0) export http_proxy="http://10.0.0.15:8000/" ;;
+ *) echo "unsupported host, exiting." ; exit 1 ;;
+ esac
fi
if [ -z "$CHROOT_BASE" ]; then
export CHROOT_BASE=/chroots