lib/vagrant-cachier/bucket.rb
# TODO: "merge" symlink and user_symlink methods
"merge" symlink and user_symlink methods
" merge " symlink and user_symlink methods
def symlink(guest_path, bucket_path = "/tmp/vagrant-cache/#{@name}")
        return if @env[:cache_dirs].include?(guest_path)
        @env[:cache_dirs] << guest_path
        comm.execute("mkdir -p #{bucket_path}")
        unless symlink?(guest_path)
          comm.sudo("mkdir -p `dirname #{guest_path}`")
          if empty_dir?(bucket_path) && !empty_dir?(guest_path)
            comm.sudo("shopt -s dotglob && mv #{guest_path}/* #{bucket_path}")
          end
          comm.sudo("rm -rf #{guest_path}")
          comm.sudo("ln -s #{bucket_path} #{guest_path}")
        end
      end
def symlink ( guest_path , bucket_path = "/tmp/vagrant-cache/#{@name}" ) return if @env [ :cache_dirs ] . include? ( guest_path ) @env [ :cache_dirs ] << guest_path comm . execute ( "mkdir -p #{bucket_path}" ) unless symlink? ( guest_path ) comm . sudo ( "mkdir -p `dirname #{guest_path}`" ) if empty_dir? ( bucket_path ) && ! empty_dir? ( guest_path ) comm . sudo ( "shopt -s dotglob && mv #{guest_path}/* #{bucket_path}" ) end comm . sudo ( "rm -rf #{guest_path}" ) comm . sudo ( "ln -s #{bucket_path} #{guest_path}" ) end end
TODO: "merge" symlink and user_symlink methods
TODO : " merge " symlink and user_symlink methods
# Warm up cache with guest machine data
guest_path
<not_specific>
bucket_path
<not_specific>