six-rsync 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/bin/six-rsync +1 -9
- data/bin/six-rsync-mirror +1 -9
- data/lib/six/rsync-app.rb +0 -2
- data/lib/six/rsync.rb +5 -8
- metadata +2 -2
data/Rakefile
CHANGED
data/bin/six-rsync
CHANGED
@@ -7,15 +7,7 @@ rescue => e
|
|
7
7
|
puts e.class, e.message, e.backtrace.join("\n")
|
8
8
|
begin
|
9
9
|
require 'fileutils'
|
10
|
-
|
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")
|
10
|
+
path = File.join(Six::Repositories::Rsync::DATA_PATH, 'logs')
|
19
11
|
FileUtils.mkdir_p path unless File.exists?(path)
|
20
12
|
File.open(File.join(path, "six-rsync-error.log"), 'w') {|f| f.puts e.class, e.message, e.backtrace.join("\n")}
|
21
13
|
rescue
|
data/bin/six-rsync-mirror
CHANGED
@@ -7,15 +7,7 @@ rescue => e
|
|
7
7
|
puts e.class, e.message, e.backtrace.join("\n")
|
8
8
|
begin
|
9
9
|
require 'fileutils'
|
10
|
-
|
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")
|
10
|
+
path = File.join(Six::Repositories::Rsync::DATA_PATH, 'logs')
|
19
11
|
FileUtils.mkdir_p path unless File.exists?(path)
|
20
12
|
File.open(File.join(path, "six-rsync-error.log"), 'w') {|f| f.puts e.class, e.message, e.backtrace.join("\n")}
|
21
13
|
rescue
|
data/lib/six/rsync-app.rb
CHANGED
data/lib/six/rsync.rb
CHANGED
@@ -30,18 +30,15 @@ module Six
|
|
30
30
|
end
|
31
31
|
|
32
32
|
module Rsync
|
33
|
-
|
33
|
+
COMPONENT = 'six-rsync'
|
34
|
+
VERSION = '0.4.6'
|
34
35
|
FOLDER = /(.*)\/(.*)/
|
35
36
|
|
36
37
|
case RUBY_PLATFORM
|
37
38
|
when /-mingw32$/, /-mswin32$/
|
38
39
|
TEMP_PATH = if ENV['TEMP']
|
39
40
|
if ENV['TEMP'].size > 0
|
40
|
-
|
41
|
-
ENV['TEMP']
|
42
|
-
else
|
43
|
-
BASE_PATH
|
44
|
-
end
|
41
|
+
File.directory?(ENV['TEMP']) ? ENV['TEMP'] : BASE_PATH
|
45
42
|
else
|
46
43
|
BASE_PATH
|
47
44
|
end
|
@@ -50,10 +47,10 @@ module Six
|
|
50
47
|
end
|
51
48
|
HOME_PATH = File.exists?(File.join(ENV['APPDATA'])) ? File.join(ENV['APPDATA']) : TEMP_PATH
|
52
49
|
else
|
53
|
-
HOME_PATH = '
|
50
|
+
HOME_PATH = '~/'
|
54
51
|
TEMP_PATH = '/tmp'
|
55
52
|
end
|
56
|
-
DATA_PATH = File.join(HOME_PATH,
|
53
|
+
DATA_PATH = File.join(HOME_PATH, COMPONENT)
|
57
54
|
CONFIG_FILE = File.join(DATA_PATH, 'config.yml')
|
58
55
|
if File.exists?(DATA_PATH)
|
59
56
|
unless File.directory?(DATA_PATH)
|