six-updater 0.14.2 → 0.14.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/six/updater.rb +1 -1
- data/lib/six/updater/mod.rb +30 -1
- data/lib/six/updater/options.rb +7 -11
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/six/updater.rb
CHANGED
data/lib/six/updater/mod.rb
CHANGED
@@ -292,6 +292,35 @@ module Six
|
|
292
292
|
# TODO: Cleanup Userconfig ?
|
293
293
|
end
|
294
294
|
|
295
|
+
# Process keys
|
296
|
+
def keys(force = true)
|
297
|
+
if @modconfig[:disabled]
|
298
|
+
log.info "Mod is tagged 'disabled' in the configuration file. Skipping..."
|
299
|
+
return
|
300
|
+
end
|
301
|
+
unless @installed
|
302
|
+
not_a_repository
|
303
|
+
return
|
304
|
+
end
|
305
|
+
|
306
|
+
path = File.join(@path, 'keys')
|
307
|
+
if File.exists?(path)
|
308
|
+
log.info "Found keys, processing..."
|
309
|
+
k_path = File.join(@config[:app_path], 'keys')
|
310
|
+
Dir[File.join(path, '*.bikey')].each do |key|
|
311
|
+
key[/(.*)\/(.*)/]
|
312
|
+
$2[/(.*)_(.*)/]
|
313
|
+
k = $1
|
314
|
+
if k
|
315
|
+
Dir[File.join(k_path, "#{k}_*.bikey")].each do |delkey|
|
316
|
+
FileUtils::rm_f(delkey)
|
317
|
+
end
|
318
|
+
end
|
319
|
+
FileUtils::cp(key, k_path)
|
320
|
+
end
|
321
|
+
end
|
322
|
+
end
|
323
|
+
|
295
324
|
# Process userconfigs
|
296
325
|
# TODO: Add this processing to update, aka; IF userconfig has changed THEN update it
|
297
326
|
def userconfig(force = true)
|
@@ -309,7 +338,7 @@ module Six
|
|
309
338
|
f.gsub!('@', '')
|
310
339
|
path = File.join(@path, 'userconfig')
|
311
340
|
if FileTest.exist?(path)
|
312
|
-
uconfig = File.join(@config[:
|
341
|
+
uconfig = File.join(@config[:app_path], 'userconfig')
|
313
342
|
uconfigpath = File.join(uconfig, f)
|
314
343
|
if !force && FileTest.exist?(uconfigpath)
|
315
344
|
log.debug "Userconfig folder already found, skipping"
|
data/lib/six/updater/options.rb
CHANGED
@@ -38,6 +38,10 @@ module Six
|
|
38
38
|
todo << :userconfig if bool
|
39
39
|
end
|
40
40
|
|
41
|
+
opts.on("-k", "--keys", "Processes the keys of each mod. Removes old keys automatically") do |bool|
|
42
|
+
todo << :keys if bool
|
43
|
+
end
|
44
|
+
|
41
45
|
opts.on("-l", "--changelog", "Display Changelog after update") do |bool|
|
42
46
|
second_todo << :changelog if bool
|
43
47
|
end
|
@@ -50,7 +54,7 @@ module Six
|
|
50
54
|
general_todo << :createshortcut if bool
|
51
55
|
end
|
52
56
|
|
53
|
-
opts.on("-
|
57
|
+
opts.on("-t", "--createdesktopshortcut", "Creates shortcut to run the game with the mods, on the desktop") do |bool|
|
54
58
|
general_todo << :createdesktopshortcut if bool
|
55
59
|
end
|
56
60
|
|
@@ -70,20 +74,12 @@ module Six
|
|
70
74
|
options[:force] = bool
|
71
75
|
end
|
72
76
|
|
73
|
-
opts.on("--depth I", Integer, "Clone depth, default: #{@config[:depth]}. Set to 0 to clone all history") do |s|
|
74
|
-
options[:depth] = s
|
75
|
-
end
|
76
|
-
|
77
77
|
opts.on("--mods S", String, "Additional Mods") do |s|
|
78
78
|
options[:mods] = s
|
79
79
|
end
|
80
80
|
|
81
|
-
opts.on("--
|
82
|
-
options[:
|
83
|
-
end
|
84
|
-
|
85
|
-
opts.on("--gitpath S", String, "Git binary") do |s|
|
86
|
-
options[:gitpath] = s
|
81
|
+
opts.on("--apppath S", String, "Destination folder") do |s|
|
82
|
+
options[:app_path] = s
|
87
83
|
end
|
88
84
|
end.parse!
|
89
85
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: six-updater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sickboy
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-07 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|