Commit e36b23b5 authored by Lucas Nussbaum's avatar Lucas Nussbaum
Browse files

[dev] Fix retcode for wiki generators

parent e96fa975
...@@ -44,6 +44,7 @@ SITE_GENERATORS = { ...@@ -44,6 +44,7 @@ SITE_GENERATORS = {
} }
GENERATORS = GLOBAL_GENERATORS.merge(SITE_GENERATORS) GENERATORS = GLOBAL_GENERATORS.merge(SITE_GENERATORS)
ret = true
options = WikiGenerator::parse_options options = WikiGenerator::parse_options
myopts = options.clone myopts = options.clone
options[:generators].each do |g| options[:generators].each do |g|
...@@ -51,12 +52,12 @@ options[:generators].each do |g| ...@@ -51,12 +52,12 @@ options[:generators].each do |g|
options[:sites].each do |s| options[:sites].each do |s|
myopts[:sites] = [s] myopts[:sites] = [s]
if GLOBAL_GENERATORS.has_key?(g) and s == 'global' if GLOBAL_GENERATORS.has_key?(g) and s == 'global'
ret = GLOBAL_GENERATORS[g][:gen].new(GLOBAL_GENERATORS[g][:page]).exec(myopts) ret &= GLOBAL_GENERATORS[g][:gen].new(GLOBAL_GENERATORS[g][:page]).exec(myopts)
elsif SITE_GENERATORS.has_key?(g) and s != 'global' elsif SITE_GENERATORS.has_key?(g) and s != 'global'
ret = SITE_GENERATORS[g][:gen].new(s.capitalize + SITE_GENERATORS[g][:page_suffix], s).exec(myopts) ret &= SITE_GENERATORS[g][:gen].new(s.capitalize + SITE_GENERATORS[g][:page_suffix], s).exec(myopts)
else else
puts "Nothing to do: #{g}/#{s}" puts "Nothing to do: #{g}/#{s}"
end end
exit(ret)
end end
end end
exit(ret)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment