aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-03-18 21:17:01 -0400
committerRalph Amissah <ralph@amissah.com>2013-03-18 21:27:02 -0400
commit3156fe4d0b564dac31c92e3750eb0a79a9ce4f63 (patch)
tree1ee45e8cd1ec8275d03ded4e3c3d4cc23bc8cc1b /lib
parentv4: version & changelog (diff)
v4: hub, processing flow, sequence, fix
* re-run manifests at end of general processing run: * where document source shared and more than one markup file processed; * where translations of same document exist (determined by filename)
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v4/hub.rb27
1 files changed, 20 insertions, 7 deletions
diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb
index ba36c9ad..6577f1fa 100644
--- a/lib/sisu/v4/hub.rb
+++ b/lib/sisu/v4/hub.rb
@@ -146,11 +146,9 @@ module SiSU
number_of_files={}
@opt.files.each_with_index do |fns,i|
fn=fns.gsub(/(?:~(?:#{@r}))?\.ss[tm]$/,'')
- if number_of_files[fn].is_a?(Array)
- number_of_files[fn] << i
- else
- number_of_files.store(fn,[i])
- end
+ (number_of_files[fn].is_a?(Array)) \
+ ? (number_of_files[fn] << i)
+ : (number_of_files.store(fn,[i]))
end
files_translated_idx=[]
number_of_files.each do |x|
@@ -359,6 +357,14 @@ module SiSU
require_relative 'dbi_discrete' # -d dbi_discrete.rb
SiSU_DBI_Discrete::SQL.new(@opt).build
end
+ if @opt.act[:manifest][:set]==:on #% --manifest, -y
+ require_relative 'manifest' # -y manifest.rb
+ ((@opt.act[:sisupod][:set]==:on \
+ || @opt.act[:share_source][:set]==:on) \
+ && @opt.files.length < 2 ) \
+ ? nil
+ : SiSU_Manifest::Source.new(@opt).read
+ end
end
end
def loop_files_on_given_option_pre_do
@@ -413,9 +419,16 @@ module SiSU
end
end
end
- if @opt.act[:manifest][:set]==:on #% --manifest, -y
+ if (@opt.act[:sisupod][:set]==:on \
+ || @opt.act[:share_source][:set]==:on) \
+ and @opt.act[:manifest][:set]==:on #% --manifest, -y
require_relative 'manifest' # -y manifest.rb
- SiSU_Manifest::Source.new(@opt).read
+ begin
+ ensure
+ OptionLoopFiles.new(@opt).loop_files_on_given_option_bundle do
+ SiSU_Manifest::Source.new(@opt).read
+ end
+ end
end
ensure
path_pod=@env.processing_path.processing_sisupod(@opt).paths