a63156e482
This bucket must be explicitly enabled and may be useful for users wanting a generic caching mechanism that they can use directly instead of via some predefined packaging system. For instance, this enables one to implement a cache for packages downloaded via wget or curl.
19 lines
491 B
Ruby
19 lines
491 B
Ruby
module VagrantPlugins
|
|
module Cachier
|
|
class Bucket
|
|
class Generic < Bucket
|
|
def self.capability
|
|
:generic_cache_dir
|
|
end
|
|
|
|
def install
|
|
if @configs.has_key?(:cache_dir)
|
|
@name = @configs.has_key?(:name) ? "generic-#{@configs[:name]}" : "generic"
|
|
symlink(@configs[:cache_dir])
|
|
else
|
|
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'Generic')
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|