six-updater 0.10.10 → 0.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/six/updater.rb +1 -1
- data/lib/six/updater/mod.rb +15 -3
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/six/updater.rb
CHANGED
data/lib/six/updater/mod.rb
CHANGED
@@ -229,6 +229,14 @@ module Six
|
|
229
229
|
end
|
230
230
|
end
|
231
231
|
|
232
|
+
# TODO: Detect missing / out of date config files, and notify user
|
233
|
+
begin
|
234
|
+
userconfig(false)
|
235
|
+
rescue
|
236
|
+
log.warn 'WARNING: Userconfig processing is unable to complete.'
|
237
|
+
log.debug "#{$!}"
|
238
|
+
end
|
239
|
+
|
232
240
|
unless done
|
233
241
|
log.warn 'WARNING: Update was unable to complete. This could be due to a server / connection problem, or due to files in use or out of synch repositories. Please make sure ArmA is closed, retry, otherwise reset and retry'
|
234
242
|
log_status
|
@@ -336,7 +344,7 @@ module Six
|
|
336
344
|
|
337
345
|
# Process userconfigs
|
338
346
|
# TODO: Add this processing to update, aka; IF userconfig has changed THEN update it
|
339
|
-
def userconfig
|
347
|
+
def userconfig(force = true)
|
340
348
|
unless @installed
|
341
349
|
not_a_repository
|
342
350
|
return
|
@@ -346,9 +354,13 @@ module Six
|
|
346
354
|
f = @modconfig[:folder].clone
|
347
355
|
f.gsub!('@', '')
|
348
356
|
path = File.join(@path, 'userconfig')
|
349
|
-
uconfig = File.join(@config[:app_path], 'userconfig')
|
350
|
-
uconfigpath = File.join(uconfig, f)
|
351
357
|
if FileTest.exist?(path)
|
358
|
+
uconfig = File.join(@config[:app_path], 'userconfig')
|
359
|
+
uconfigpath = File.join(uconfig, f)
|
360
|
+
if !force && FileTest.exist?(uconfigpath)
|
361
|
+
log.debug "Userconfig folder already found, skipping"
|
362
|
+
return
|
363
|
+
end
|
352
364
|
log.info "Found userconfig, processing..."
|
353
365
|
FileUtils::mv(uconfigpath, "#{uconfigpath}_#{time}") if FileTest.exist?(uconfigpath)
|
354
366
|
FileUtils::mkdir_p uconfig unless FileTest.exist?(uconfig)
|
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.10.
|
4
|
+
version: 0.10.11
|
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: 2009-12-
|
12
|
+
date: 2009-12-07 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|