From 0aa7517b0c8f58b4fb68eac29a73def9fe447a12 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Mon, 6 Apr 2015 18:14:00 +0200 Subject: reproducible: setup_schroot: set up apt http_proxy in the chroot only if $http_proxy is defined --- bin/reproducible_setup_schroot.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/reproducible_setup_schroot.sh b/bin/reproducible_setup_schroot.sh index c8f9a569..41dc2354 100755 --- a/bin/reproducible_setup_schroot.sh +++ b/bin/reproducible_setup_schroot.sh @@ -47,7 +47,9 @@ bootstrap() { echo -e '#!/bin/sh\nexit 101' | sudo tee $CHROOT_TARGET/usr/sbin/policy-rc.d >/dev/null sudo chmod +x $CHROOT_TARGET/usr/sbin/policy-rc.d - echo "Acquire::http::Proxy \"$http_proxy\";" | sudo tee $CHROOT_TARGET/etc/apt/apt.conf.d/80proxy >/dev/null + if [ ! -z "$http_proxy" ] ; then + echo "Acquire::http::Proxy \"$http_proxy\";" | sudo tee $CHROOT_TARGET/etc/apt/apt.conf.d/80proxy >/dev/null + fi echo "deb-src $MIRROR $SUITE main" | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list > /dev/null sudo chroot $CHROOT_TARGET apt-get update -- cgit v1.2.3-70-g09d2