six-rsync 0.3.8 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/bin/six-rsync +25 -0
- data/bin/six-rsync-mirror +25 -0
- data/lib/six/rsync/base.rb +1 -1
- data/lib/six/rsync/lib.rb +803 -863
- data/lib/six/rsync/options.rb +4 -0
- data/lib/six/rsync-app.rb +6 -0
- data/lib/six/rsync-mirror.rb +12 -0
- data/lib/six/rsync.rb +1 -1
- metadata +10 -6
data/Rakefile
CHANGED
@@ -12,18 +12,18 @@ require 'rake/testtask'
|
|
12
12
|
|
13
13
|
spec = Gem::Specification.new do |s|
|
14
14
|
s.name = 'six-rsync'
|
15
|
-
s.version = '0.
|
15
|
+
s.version = '0.4.1'
|
16
16
|
s.has_rdoc = true
|
17
17
|
s.extra_rdoc_files = ['README', 'LICENSE']
|
18
18
|
s.summary = 'Your summary here'
|
19
19
|
s.description = s.summary
|
20
20
|
s.author = 'Sickboy'
|
21
21
|
s.email = 'sb@dev-heaven.net'
|
22
|
-
# s.executables = ['your_executable_here']
|
23
22
|
s.add_dependency('log4r', '>= 1.1.2')
|
24
23
|
s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,spec}/**/*") + Dir.glob("lib/*/**/*.rb")
|
25
24
|
s.require_path = "lib"
|
26
25
|
s.bindir = "bin"
|
26
|
+
s.executables = ['six-rsync', 'six-rsync-mirror']
|
27
27
|
end
|
28
28
|
|
29
29
|
Rake::GemPackageTask.new(spec) do |p|
|
data/bin/six-rsync
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
begin
|
5
|
+
load 'six/rsync-app.rb'
|
6
|
+
rescue => e
|
7
|
+
puts e.class, e.message, e.backtrace.join("\n")
|
8
|
+
begin
|
9
|
+
require 'fileutils'
|
10
|
+
dpath = Dir.pwd
|
11
|
+
unless File.exists?(File.join(Dir.pwd, "legacy.txt"))
|
12
|
+
if ENV['APPDATA']
|
13
|
+
if ENV['APPDATA'].size > 0
|
14
|
+
dpath = File.join(ENV['APPDATA'], 'Six-Updater') if File.directory?(ENV['APPDATA'])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
path = File.join(dpath, "logs")
|
19
|
+
FileUtils.mkdir_p path unless File.exists?(path)
|
20
|
+
File.open(File.join(path, "six-rsync-error.log"), 'w') {|f| f.puts e.class, e.message, e.backtrace.join("\n")}
|
21
|
+
rescue
|
22
|
+
puts "ERROR: #{$!}"
|
23
|
+
end
|
24
|
+
sleep 10
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
begin
|
5
|
+
load 'six/rsync-mirror.rb'
|
6
|
+
rescue => e
|
7
|
+
puts e.class, e.message, e.backtrace.join("\n")
|
8
|
+
begin
|
9
|
+
require 'fileutils'
|
10
|
+
dpath = Dir.pwd
|
11
|
+
unless File.exists?(File.join(Dir.pwd, "legacy.txt"))
|
12
|
+
if ENV['APPDATA']
|
13
|
+
if ENV['APPDATA'].size > 0
|
14
|
+
dpath = File.join(ENV['APPDATA'], 'Six-Updater') if File.directory?(ENV['APPDATA'])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
path = File.join(dpath, "logs")
|
19
|
+
FileUtils.mkdir_p path unless File.exists?(path)
|
20
|
+
File.open(File.join(path, "six-rsync-error.log"), 'w') {|f| f.puts e.class, e.message, e.backtrace.join("\n")}
|
21
|
+
rescue
|
22
|
+
puts "ERROR: #{$!}"
|
23
|
+
end
|
24
|
+
sleep 10
|
25
|
+
end
|