summaryrefslogtreecommitdiffstats
path: root/build/install-chroot.sh
diff options
context:
space:
mode:
authorjames.wei@intel.com <james.wei@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-09 18:31:56 +0000
committerjames.wei@intel.com <james.wei@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-09 18:31:56 +0000
commitbb2c63a02afdc96c3a01702814a9e63d575a6a70 (patch)
treed0260a409ee104877d8445d7154a75b540e2f463 /build/install-chroot.sh
parentf36f4094c165689e367f2bc8f1ede5a45f5bae6d (diff)
downloadchromium_src-bb2c63a02afdc96c3a01702814a9e63d575a6a70.zip
chromium_src-bb2c63a02afdc96c3a01702814a9e63d575a6a70.tar.gz
chromium_src-bb2c63a02afdc96c3a01702814a9e63d575a6a70.tar.bz2
add proxy support in install-chroot.sh
BUG=126477 TEST= Review URL: https://chromiumcodereview.appspot.com/10375036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136084 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/install-chroot.sh')
-rwxr-xr-xbuild/install-chroot.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/build/install-chroot.sh b/build/install-chroot.sh
index 82caff2..1743703 100755
--- a/build/install-chroot.sh
+++ b/build/install-chroot.sh
@@ -339,8 +339,9 @@ if [ -z "${mirror}" ]; then
mirror="http://archive.ubuntu.com/ubuntu" ||
mirror="http://ftp.us.debian.org/debian"
fi
- sudo debootstrap ${archflag} "${distname}" /var/lib/chroot/"${target}" \
- "$mirror"
+
+sudo ${http_proxy:+http_proxy="${http_proxy}"} debootstrap ${archflag} \
+ "${distname}" "/var/lib/chroot/${target}" "$mirror"
# Add new entry to /etc/schroot/schroot.conf
grep -qs ubuntu.com /usr/share/debootstrap/scripts/"${distname}" &&
@@ -552,6 +553,13 @@ sudo sed -i '/^deb[^-]/p
s/^deb\([^-]\)/deb-src\1/' \
"/var/lib/chroot/${target}/etc/apt/sources.list"
+# Set apt proxy if host has set http_proxy
+if [ -n "${http_proxy}" ]; then
+ sudo sh -c '
+ echo "Acquire::http::proxy \"'"${http_proxy}"'\";" \
+ >>"/var/lib/chroot/'"${target}"'/etc/apt/apt.conf"'
+fi
+
# Update packages
sudo "/usr/local/bin/${target%bit}" /bin/sh -c '
apt-get update; apt-get -y dist-upgrade' || :