mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-07 18:01:06 +03:00
makebuildserver: allow setting apt mirror from command line
On some setups, using a custom apt mirror is essential, so this adds a command line flag to override the default one: http://ftp.uk.debian.org/debian/ For example, someone who runs a local mirror for offline and low bandwidth situations. This uses a % rather than a .format() to avoid escaping { and }, which have meaning when using .format().
This commit is contained in:
parent
4b0a6ed29f
commit
f47677ef36
2 changed files with 10 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
|||
|
||||
user = node[:settings][:user]
|
||||
debian_mirror = node[:settings][:debian_mirror]
|
||||
|
||||
execute 'set_debian_mirror' do
|
||||
command "sed -i 's,http://ftp.uk.debian.org/debian/,#{debian_mirror},g' /etc/apt/sources.list"
|
||||
end
|
||||
|
||||
execute "apt-get-update" do
|
||||
command "apt-get update"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue