From ab9d8fb3dbc747d6deb6095c421fac47af941d7b Mon Sep 17 00:00:00 2001 From: Adam Hamsik Date: Tue, 17 Jul 2012 15:21:22 +0200 Subject: [PATCH] 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. --- bin/gollum | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/gollum b/bin/gollum index 87d2bbe0..72a5f9aa 100755 --- a/bin/gollum +++ b/bin/gollum @@ -48,11 +48,15 @@ opts = OptionParser.new do |opts| opts.on("--page-file-dir [PATH]", "Specify the sub directory for all page files (default: repository root).") do |path| wiki_options[:page_file_dir] = path end - + opts.on("--base-path [PATH]", "Specify the base path.") do |path| wiki_options[:base_path] = path 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| wiki_options[:ref] = ref end @@ -78,7 +82,11 @@ rescue OptionParser::InvalidOption exit 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'] require 'irb'