Allow custom dir.
This commit is contained in:
+6
-4
@@ -6,7 +6,9 @@ help = <<HELP
|
|||||||
Gollum is a multi-format Wiki Engine/API/Frontend.
|
Gollum is a multi-format Wiki Engine/API/Frontend.
|
||||||
|
|
||||||
Basic Command Line Usage:
|
Basic Command Line Usage:
|
||||||
gollum [options]
|
gollum [OPTIONS] [PATH]
|
||||||
|
|
||||||
|
PATH The path to the Gollum repository.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
HELP
|
HELP
|
||||||
@@ -21,11 +23,11 @@ options = {}
|
|||||||
opts = OptionParser.new do |opts|
|
opts = OptionParser.new do |opts|
|
||||||
opts.banner = help
|
opts.banner = help
|
||||||
|
|
||||||
opts.on("--port [PORT]", "Bind port (default port 5432)") do |port|
|
opts.on("--port [PORT]", "Bind port (default port 5432).") do |port|
|
||||||
options['port'] = port
|
options['port'] = port
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.on("--version", "Display current version") do
|
opts.on("--version", "Display current version.") do
|
||||||
puts "Gollum " + Gollum::VERSION
|
puts "Gollum " + Gollum::VERSION
|
||||||
exit 0
|
exit 0
|
||||||
end
|
end
|
||||||
@@ -34,6 +36,6 @@ end
|
|||||||
# Read command line options into `options` hash
|
# Read command line options into `options` hash
|
||||||
opts.parse!
|
opts.parse!
|
||||||
|
|
||||||
$path = Dir.pwd
|
$path = ARGV[0] || Dir.pwd
|
||||||
|
|
||||||
Precious::App.run!
|
Precious::App.run!
|
||||||
|
|||||||
Reference in New Issue
Block a user