vagrant-zscp 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant/zscp/helper.rb +8 -7
- data/lib/vagrant/zscp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98b0306ce377fd7732e122c431adf2b4cd39704b
|
4
|
+
data.tar.gz: 6d18d1ac0f8f679cd5b0a07fe0d7cb15f57dea1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d5370aab4f6c94a1377805ca55d634f83e221c0780955311b6a0bebfd3c3dbe95066d265da45f747731ccc24f8568d14e868f27a69ba1f8969c23a8cb676cae
|
7
|
+
data.tar.gz: fc1b28a0ed5821f098fab2813dfb5a5be3faff8eb9aa926897ae345095292ef637ffd1b27445935d829a88afd982df891b2dc2b254f485f535b7ac485a92d8ba
|
data/lib/vagrant/zscp/helper.rb
CHANGED
@@ -11,6 +11,7 @@ module Vagrant
|
|
11
11
|
|
12
12
|
def self.scp(machine, ssh_info, opts)
|
13
13
|
guestpath = opts[:guestpath]
|
14
|
+
guestpath += "/" if !guestpath.end_with?("/")
|
14
15
|
hostpath = File.expand_path(opts[:hostpath], machine.env.root_path)
|
15
16
|
hostpath = Vagrant::Util::Platform.fs_real_path(hostpath).to_s
|
16
17
|
hostpath += "/" if !hostpath.end_with?("/")
|
@@ -25,11 +26,12 @@ module Vagrant
|
|
25
26
|
host = ssh_info[:host]
|
26
27
|
|
27
28
|
machine.ui.info("Sending #{hostpath} to #{guestpath}")
|
28
|
-
remotely_execute(ssh_info, "sudo mkdir -p #{guestpath}; sudo chown #{username}:$(id -gn #{username}) #{guestpath}")
|
29
|
+
remotely_execute(ssh_info, "sudo mkdir -p #{guestpath} 2> /dev/null; sudo chown #{username}:$(id -gn #{username}) #{guestpath}")
|
29
30
|
|
30
|
-
temp_file = `mktemp -t 'temp.
|
31
|
+
temp_file = `mktemp -t 'temp.tar.gz' 2> /dev/null || mktemp -t 'temp.tar.gz.XXXX'`.strip
|
32
|
+
temp_file_name = Pathname.new(temp_file).basename
|
31
33
|
machine.ui.info("Compressing #{hostpath} into #{temp_file}")
|
32
|
-
|
34
|
+
`tar -czhf #{temp_file} -C #{hostpath} #{included_files}`
|
33
35
|
|
34
36
|
machine.ui.info("Copying #{temp_file} to #{guestpath}")
|
35
37
|
command = [
|
@@ -42,10 +44,9 @@ module Vagrant
|
|
42
44
|
"#{temp_file}",
|
43
45
|
"#{username}@#{host}:#{guestpath}"
|
44
46
|
].join(' ')
|
45
|
-
|
47
|
+
`#{command}`
|
46
48
|
|
47
|
-
|
48
|
-
remotely_execute(ssh_info, "tar -xzf #{guestpath}/temp.*.tar.gz -C #{guestpath}; rm #{guestpath}/temp.*.tar.gz")
|
49
|
+
remotely_execute(ssh_info, "tar -xzf #{guestpath}#{temp_file_name} -C #{guestpath}; rm #{guestpath}#{temp_file_name}")
|
49
50
|
machine.ui.info("#{guestpath} synchronised")
|
50
51
|
end
|
51
52
|
|
@@ -60,7 +61,7 @@ module Vagrant
|
|
60
61
|
"#{ssh_info[:username]}@#{ssh_info[:host]}",
|
61
62
|
"'#{command}'"
|
62
63
|
].join(' ')
|
63
|
-
|
64
|
+
`#{ssh_command}`
|
64
65
|
end
|
65
66
|
end
|
66
67
|
end
|
data/lib/vagrant/zscp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-zscp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin Hebert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|