Add build tools 18.0.1

This commit is contained in:
Ciaran Gultnieks 2013-08-08 11:43:15 +01:00
parent a2e81658ef
commit 8cf3b9ec5d

View file

@ -23,26 +23,28 @@ execute "add-android-sdk-path" do
not_if "grep #{sdk_loc} /home/#{user}/.bashrc" not_if "grep #{sdk_loc} /home/#{user}/.bashrc"
end end
script "add_build_tools" do %w{17.0.0 18.0.1}.each do |ver|
interpreter "bash"
user user script "add_build_tools_#{ver}" do
cwd "/tmp" interpreter "bash"
code " user user
if [ -f /vagrant/cache/build-tools/17.0.0.tar.gz ] ; then cwd "/tmp"
echo Installing from cache code "
mkdir #{sdk_loc}/build-tools if [ -f /vagrant/cache/build-tools/#{ver}.tar.gz ] ; then
tar -C #{sdk_loc}/build-tools -z -x -f /vagrant/cache/build-tools/17.0.0.tar.gz echo Installing from cache
else mkdir #{sdk_loc}/build-tools
#{sdk_loc}/tools/android update sdk --no-ui -a -t build-tools-17.0.0 <<X tar -C #{sdk_loc}/build-tools -z -x -f /vagrant/cache/build-tools/#{ver}.tar.gz
else
#{sdk_loc}/tools/android update sdk --no-ui -a -t build-tools-#{ver} <<X
y y
X X
fi fi
" "
not_if "test -d #{sdk_loc}/build-tools/17.0.0" not_if "test -d #{sdk_loc}/build-tools/#{ver}"
end
end end
%w{android-3 android-4 android-7 android-8 android-10 android-11 %w{android-3 android-4 android-7 android-8 android-10 android-11
android-12 android-13 android-14 android-15 android-16 android-17 android-18 android-12 android-13 android-14 android-15 android-16 android-17 android-18
extra-android-support}.each do |sdk| extra-android-support}.each do |sdk|