Add option to define gollum path from command line. This way we can use different git repo for wiki files and different repo for
gollum.
This commit is contained in:
+9
-1
@@ -53,6 +53,10 @@ opts = OptionParser.new do |opts|
|
|||||||
wiki_options[:base_path] = path
|
wiki_options[:base_path] = path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
opts.on("--gollum-path [PATH]", "Specify the gollum path.") do |path|
|
||||||
|
wiki_options[:gollum_path] = path
|
||||||
|
end
|
||||||
|
|
||||||
opts.on("--ref [REF]", "Specify the repository ref to use (default: master).") do |ref|
|
opts.on("--ref [REF]", "Specify the repository ref to use (default: master).") do |ref|
|
||||||
wiki_options[:ref] = ref
|
wiki_options[:ref] = ref
|
||||||
end
|
end
|
||||||
@@ -78,7 +82,11 @@ rescue OptionParser::InvalidOption
|
|||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
gollum_path = ARGV[0] || Dir.pwd
|
if wiki_options[:gollum_path] then
|
||||||
|
gollum_path = wiki_options[:gollum_path]
|
||||||
|
else
|
||||||
|
gollum_path = ARGV[0] || Dir.pwd
|
||||||
|
end
|
||||||
|
|
||||||
if options['irb']
|
if options['irb']
|
||||||
require 'irb'
|
require 'irb'
|
||||||
|
|||||||
Reference in New Issue
Block a user