summaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2012-05-14 21:04:27 +0200
committerTails developers <amnesia@boum.org>2012-05-16 13:30:41 +0200
commit5fc917c562a3d408668f51972ff317d533cab5b1 (patch)
tree8c5beb2137ff5624a4da9edc608c78b12dbd6eab /Rakefile
parentf7652e5671ee43a6c32461ae06b9d1b8be06c916 (diff)
vagrant: Add defaults for HTTP proxy build settings
If there is an HTTP proxy in the environment, we use it. If not, we switch to the in-VM proxy. This can be overidden through TAILS_BUILD_OPTIONS.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index ba15ffd..307edba 100644
--- a/Rakefile
+++ b/Rakefile
@@ -34,7 +34,12 @@ EXTERNAL_HTTP_PROXY = ENV['http_proxy']
VIRTUAL_MACHINE_HOSTNAME = 'squeeze.vagrantup.com'
task :parse_build_options do
- options = ENV['TAILS_BUILD_OPTIONS'] || ''
+ options = ''
+
+ # Use in-VM proxy unless an external proxy is set
+ options += 'vmproxy ' unless EXTERNAL_HTTP_PROXY
+
+ options += ENV['TAILS_BUILD_OPTIONS'] if ENV['TAILS_BUILD_OPTIONS']
options.split(' ').each do |opt|
case opt
# HTTP proxy settings