ric 0.11.9 → 0.11.10
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.yml +2 -0
- data/VERSION +1 -1
- data/bin/xcopy +12 -22
- data/lib/ric/files.rb +4 -1
- data/ric.gemspec +1 -1
- metadata +3 -3
data/HISTORY.yml
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.10
|
data/bin/xcopy
CHANGED
@@ -25,14 +25,6 @@
|
|
25
25
|
'dryrun' => true,
|
26
26
|
}
|
27
27
|
|
28
|
-
#def usage(comment=nil)
|
29
|
-
# puts "#{$0} v.#{$PROG_VER}"
|
30
|
-
# puts "Usage: #{File.basename $0} [-dhjv] [-l LOGFILE] <FOO> <BAR>"
|
31
|
-
# puts $opts
|
32
|
-
# pred comment if comment
|
33
|
-
# exit 11
|
34
|
-
#end
|
35
|
-
|
36
28
|
def main
|
37
29
|
debug_on 'Just created script, presuming u need some debug. TODO REMOVE ME when everything works!' if $DEBUG
|
38
30
|
# Maybe you may want to check on ARGV
|
@@ -43,21 +35,19 @@
|
|
43
35
|
xcopy(
|
44
36
|
File.expand_path(myconf['from']),
|
45
37
|
File.expand_path(myconf['to']),
|
46
|
-
myconf['files'] ,
|
47
|
-
myconf
|
48
|
-
#‘’:dryrun => myconf['dryrun'] ,
|
49
|
-
#‘’:description => myconf['dryrun'] ,
|
38
|
+
myconf['files'] , #myconf
|
39
|
+
:dryrun => myconf['dryrun']
|
50
40
|
)
|
51
41
|
end
|
52
42
|
|
53
|
-
|
54
|
-
def fatal(ret,str=nil)
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
end
|
43
|
+
## remove me in 0.11.8!
|
44
|
+
#def fatal(ret,str=nil)
|
45
|
+
# unless str
|
46
|
+
# str = ret
|
47
|
+
# ret = 66
|
48
|
+
# end
|
49
|
+
# STDERR.puts "#{red 'XCpFatal (remove me from gem 0.11.7!)'}(#{ret}) #{str}"
|
50
|
+
# exit ret
|
51
|
+
#end
|
62
52
|
|
63
|
-
main
|
53
|
+
main()
|
data/lib/ric/files.rb
CHANGED
@@ -11,6 +11,7 @@ module Ric
|
|
11
11
|
n_actions = 0
|
12
12
|
puts "+ Travasing: #{yellow from} ==> #{green to}"
|
13
13
|
verbose = opts.fetch :verbose, true
|
14
|
+
dryrun = opts.fetch :dryrun, true # i scared of copying files!
|
14
15
|
|
15
16
|
unless File.exists?("#{to}/.git")
|
16
17
|
fatal 11,"Sorry cant travase data to an unversioned dir. Please version it with git (or add a .git dir/file to trick me)"
|
@@ -24,6 +25,8 @@ module Ric
|
|
24
25
|
# With this i can understand what has been deleted, with lots of magic from git on both ends.. :)
|
25
26
|
deb "+ First the differences:"
|
26
27
|
deb `diff -qr #{from} #{to} |egrep -v '\\.git' `
|
28
|
+
|
29
|
+
puts "Dryrun is: #{azure dryrun}"
|
27
30
|
|
28
31
|
puts "+ Files: #{cyan glob_files}"
|
29
32
|
Dir.chdir(from)
|
@@ -42,7 +45,7 @@ module Ric
|
|
42
45
|
command = "mkdir -p \"#{destdir}\" && cp \"#{from_file}\" \"#{to_file}\""
|
43
46
|
end
|
44
47
|
|
45
|
-
if
|
48
|
+
if dryrun
|
46
49
|
puts "[DRYRUN] Skipping #{gray command}"
|
47
50
|
else
|
48
51
|
ret = `#{command} 2>&1`
|
data/ric.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ric
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 39
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 11
|
9
|
-
-
|
10
|
-
version: 0.11.
|
9
|
+
- 10
|
10
|
+
version: 0.11.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Riccardo Carlesso
|