Allow custom dir.

This commit is contained in:
Tom Preston-Werner
2010-07-12 18:00:11 -07:00
parent ba603efaba
commit 450c168383
+6 -4
View File
@@ -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!