rbbt-util 5.26.88 → 5.26.89
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/share/rbbt_commands/migrate +9 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2048fc4bf27e71b78965d321babe1566f4bf09b654c1f418e93828fa8bc7e998
|
4
|
+
data.tar.gz: 9596275b040cee47814e374dfbc26aae14de160cde1980666d9a6a783a81c03e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ced1d0f0735e1306c245d6012acbe2c20c8aac64a08aa19fbaa80cb433693d136eff5aad65c6bbe1edc29da53429ec2dd7116189fac16b23679e7e28d7c11c6
|
7
|
+
data.tar.gz: fc75b92e3c5aa74692ec3730b4f0ffcbae2efcb46ba4e5d8e47fcf6bdac2bb5e9066db5f300c0924690fa7bc2559e9b9018c092a64dfd6bb45ef82b507c9f09a
|
data/share/rbbt_commands/migrate
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'rbbt-util'
|
4
4
|
require 'rbbt/util/simpleopt'
|
5
|
-
require 'rbbt/workflow/remote/ssh/
|
5
|
+
require 'rbbt/workflow/remote/ssh/driver'
|
6
6
|
|
7
7
|
$0 = "rbbt #{$previous_commands*""} #{ File.basename(__FILE__) }" if $previous_commands
|
8
8
|
|
@@ -42,29 +42,30 @@ path, search_path, _sep, *other = ARGV
|
|
42
42
|
search_path = 'user' if search_path.nil?
|
43
43
|
resource = Rbbt
|
44
44
|
|
45
|
-
path, real_paths = if options[:source]
|
46
|
-
paths =
|
45
|
+
path, real_paths, lpath = if options[:source]
|
46
|
+
lpath, *paths = SSHDriver.run(options[:source], <<-EOF).split("\n")
|
47
47
|
require 'rbbt-util'
|
48
48
|
path = "#{path}"
|
49
|
-
if
|
49
|
+
if Open.exists?(path)
|
50
50
|
path = #{resource.to_s}.identify(path)
|
51
51
|
else
|
52
52
|
path = Path.setup(path)
|
53
53
|
end
|
54
|
+
puts path
|
54
55
|
puts path.glob_all.collect{|p| File.directory?(p) ? p + "/" : p } * "\n"
|
55
56
|
EOF
|
56
|
-
[path, paths.collect{|p| [options[:source], p] * ":"}]
|
57
|
+
[path, paths.collect{|p| [options[:source], p] * ":"}, lpath]
|
57
58
|
else
|
58
59
|
if File.exists?(path)
|
59
60
|
path = resource.identify(path)
|
60
61
|
else
|
61
62
|
path = Path.setup(path)
|
62
63
|
end
|
63
|
-
[path, path.glob_all]
|
64
|
+
[path, path.glob_all, path]
|
64
65
|
end
|
65
66
|
|
66
67
|
target = if options[:target]
|
67
|
-
target =
|
68
|
+
target = SSHDriver.run(options[:target], <<-EOF).split("\n").first
|
68
69
|
require 'rbbt-util'
|
69
70
|
path = "#{path}"
|
70
71
|
resource = #{resource.to_s}
|
@@ -72,7 +73,7 @@ search_path = "#{search_path}"
|
|
72
73
|
puts resource[path].find(search_path)
|
73
74
|
EOF
|
74
75
|
else
|
75
|
-
resource[
|
76
|
+
resource[lpath].find(search_path)
|
76
77
|
end
|
77
78
|
|
78
79
|
real_paths.each do |source|
|