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.
|
||||
|
||||
Basic Command Line Usage:
|
||||
gollum [options]
|
||||
gollum [OPTIONS] [PATH]
|
||||
|
||||
PATH The path to the Gollum repository.
|
||||
|
||||
Options:
|
||||
HELP
|
||||
@@ -21,11 +23,11 @@ options = {}
|
||||
opts = OptionParser.new do |opts|
|
||||
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
|
||||
end
|
||||
|
||||
opts.on("--version", "Display current version") do
|
||||
opts.on("--version", "Display current version.") do
|
||||
puts "Gollum " + Gollum::VERSION
|
||||
exit 0
|
||||
end
|
||||
@@ -34,6 +36,6 @@ end
|
||||
# Read command line options into `options` hash
|
||||
opts.parse!
|
||||
|
||||
$path = Dir.pwd
|
||||
$path = ARGV[0] || Dir.pwd
|
||||
|
||||
Precious::App.run!
|
||||
|
||||
Reference in New Issue
Block a user