Change shopt to cp in order to support all *NIX shells (In my case FreeBSD sh/csh)

This commit is contained in:
Andres Montalban 2016-02-04 21:12:27 -03:00
parent da0eff6a71
commit eddb6eb456

View file

@ -52,7 +52,7 @@ module VagrantPlugins
comm.sudo("mkdir -p `dirname #{guest_path}`")
if empty_dir?(bucket_path) && !empty_dir?(guest_path)
# Warm up cache with guest machine data
comm.sudo("shopt -s dotglob && mv #{guest_path}/* #{bucket_path}")
comm.sudo("cp -rp #{guest_path}/. #{bucket_path}")
end
comm.sudo("rm -rf #{guest_path}")
comm.sudo("ln -s #{bucket_path} #{guest_path}")
@ -69,7 +69,7 @@ module VagrantPlugins
comm.execute("mkdir -p `dirname #{guest_path}`")
if empty_dir?(bucket_path) && !empty_dir?(guest_path)
# Warm up cache with guest machine data
comm.execute("shopt -s dotglob && mv #{guest_path}/* #{bucket_path}")
comm.execute("cp -rp #{guest_path}/. #{bucket_path}")
end
comm.execute("rm -rf #{guest_path}")
comm.execute("ln -s #{bucket_path} #{guest_path}")