<commit_before>
ndk_loc = node[:settings][:ndk_loc]
user = node[:settings][:user]

execute "add-android-ndk-path" do
  user user
  command "echo \"export PATH=\\$PATH:#{ndk_loc} #PATH-NDK\" >> /home/#{user}/.bsenv"
  not_if "grep PATH-NDK /home/#{user}/.bsenv"
end

execute "add-android-ndk-var" do
  user user
  command "echo \"export ANDROID_NDK=#{ndk_loc}\" >> /home/#{user}/.bsenv"
  not_if "grep ANDROID_NDK /home/#{user}/.bsenv"
end

script "setup-android-ndk" do
  timeout 14400
  interpreter "bash"
  user node[:settings][:user]
  cwd "/tmp"
  code "
    if [ `uname -m` == 'x86_64' ] ; then
       SUFFIX='_64'
    else
       SUFFIX=''
    fi
    tar jxvf /vagrant/cache/android-ndk-r9-linux-x86$SUFFIX.tar.bz2
    tar jxvf /vagrant/cache/android-ndk-r9-linux-x86$SUFFIX-legacy-toolchains.tar.bz2
    mv android-ndk-r9 #{ndk_loc}
  "
  not_if do
    File.exists?("#{ndk_loc}")
  end
end
<commit_msg>Fix incomplete ndk upgrade in d7f558ad<commit_after>
ndk_loc = node[:settings][:ndk_loc]
user = node[:settings][:user]

execute "add-android-ndk-path" do
  user user
  command "echo \"export PATH=\\$PATH:#{ndk_loc} #PATH-NDK\" >> /home/#{user}/.bsenv"
  not_if "grep PATH-NDK /home/#{user}/.bsenv"
end

execute "add-android-ndk-var" do
  user user
  command "echo \"export ANDROID_NDK=#{ndk_loc}\" >> /home/#{user}/.bsenv"
  not_if "grep ANDROID_NDK /home/#{user}/.bsenv"
end

script "setup-android-ndk" do
  timeout 14400
  interpreter "bash"
  user node[:settings][:user]
  cwd "/tmp"
  code "
    if [ `uname -m` == 'x86_64' ] ; then
       SUFFIX='_64'
    else
       SUFFIX=''
    fi
    tar jxvf /vagrant/cache/android-ndk-r9b-linux-x86$SUFFIX.tar.bz2
    tar jxvf /vagrant/cache/android-ndk-r9b-linux-x86$SUFFIX-legacy-toolchains.tar.bz2
    mv android-ndk-r9b #{ndk_loc}
  "
  not_if do
    File.exists?("#{ndk_loc}")
  end
end

{'fraction_non_alphanumeric': 0.1722643553629469, 'fraction_numerical': 0.023835319609967497, 'mean_word_length': 3.3154205607476634, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '7315573', 'n_tokens_mistral': 835, 'n_tokens_neox': 801, 'n_words': 147}