mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-11 01:30:30 +03:00
Work in progress on integrating build server
This commit is contained in:
parent
d6e390afd6
commit
498e7d3c5f
14 changed files with 334 additions and 116 deletions
34
buildserver/cookbooks/android-sdk/recipes/default.rb
Normal file
34
buildserver/cookbooks/android-sdk/recipes/default.rb
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
%w{openjdk-6-jdk}.each do |pkg|
|
||||
package pkg do
|
||||
action :install
|
||||
end
|
||||
end
|
||||
|
||||
sdk_loc = node[:settings][:sdk_loc]
|
||||
user = node[:settings][:user]
|
||||
|
||||
script "setup-android-sdk" do
|
||||
interpreter "bash"
|
||||
user user
|
||||
cwd "/tmp"
|
||||
code "
|
||||
wget http://dl.google.com/android/android-sdk_r16-linux.tgz
|
||||
tar zxvf android-sdk_r16-linux.tgz
|
||||
mv android-sdk-linux #{sdk_loc}
|
||||
rm android-sdk_r16-linux.tgz
|
||||
#{sdk_loc}/tools/android update sdk --no-ui -t platform-tool
|
||||
#{sdk_loc}/tools/android update sdk --no-ui -t platform
|
||||
#{sdk_loc}/tools/android update sdk --no-ui -t tool,platform-tool
|
||||
"
|
||||
not_if do
|
||||
File.exists?("#{sdk_loc}")
|
||||
end
|
||||
end
|
||||
|
||||
execute "add-android-sdk-path" do
|
||||
user user
|
||||
path = "#{sdk_loc}/tools:#{sdk_loc}/platform-tools"
|
||||
command "echo \"export PATH=\\$PATH:#{path}\" >> /home/#{user}/.bashrc"
|
||||
not_if "grep #{sdk_loc} /home/#{user}/.bashrc"
|
||||
end
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue