Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Forked from lusis/vagrant-cache-snippet.rb
Created April 24, 2013 17:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtimberman/5453986 to your computer and use it in GitHub Desktop.
Save jtimberman/5453986 to your computer and use it in GitHub Desktop.
if ENV['ES_CACHE']
puts "Shared cache enabled"
if ENV['ES_CACHE_TYPE'] == 'yum'
FileUtils.mkdir_p(File.join("cache","yum")) unless Dir.exists?(File.join("cache","yum"))
config.vm.share_folder("yum", "/var/cache/yum", "cache/yum")
else
FileUtils.mkdir_p(File.join("cache","apt","partial")) unless Dir.exists?(File.join("cache","apt", "partial"))
config.vm.share_folder("apt", "/var/cache/apt/archives", "cache/apt")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment