<commit_before>%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
  timeout 14400
  interpreter "bash"
  user user
  cwd "/tmp"
  code "
    tar zxvf /vagrant/cache/android-sdk_r21.0.1-linux.tgz
    mv android-sdk-linux #{sdk_loc}
    #{sdk_loc}/tools/android update sdk --no-ui -t platform-tool
    #{sdk_loc}/tools/android update sdk --no-ui -t tool
  "
  not_if "test -d #{sdk_loc}"
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<commit_msg>Remove separate jdk installation from buildserver<commit_after>
sdk_loc = node[:settings][:sdk_loc]
user = node[:settings][:user]

script "setup-android-sdk" do
  timeout 14400
  interpreter "bash"
  user user
  cwd "/tmp"
  code "
    tar zxvf /vagrant/cache/android-sdk_r21.0.1-linux.tgz
    mv android-sdk-linux #{sdk_loc}
    #{sdk_loc}/tools/android update sdk --no-ui -t platform-tool
    #{sdk_loc}/tools/android update sdk --no-ui -t tool
  "
  not_if "test -d #{sdk_loc}"
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
{'fraction_non_alphanumeric': 0.1683708248125426, 'fraction_numerical': 0.012951601908657124, 'mean_word_length': 3.573208722741433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5826070', 'n_tokens_mistral': 587, 'n_tokens_neox': 568, 'n_words': 127}