Log "UnArchiving build environment"

  execute "s3_download" do
    cwd '/tmp/'
    command "s3cmd get s3://#{node[:walletserver][:s3_bucket]}/wallet_root.tar.bz2 /tmp/"
    only_if { node[:s3cmd][:aws_access_key_id] != '' }
    notifies :run, 'execute[untar_root]', :immediately
    notifies :run, 'bash[ldconfig_walletserver]', :immediately
  end

 execute "untar_root" do
    cwd '/tmp/'
    command "tar -xjpf /tmp/wallet_root.tar.bz2 -C #{node[:walletserver][:root]}/"
    only_if { ::File.directory?(node[:walletserver][:root]) }
    action :nothing
  end
