Gollum executable.

This commit is contained in:
Tom Preston-Werner
2010-07-12 17:54:13 -07:00
parent 0a13ccb9b9
commit c88a1ca5a5
3 changed files with 42 additions and 6 deletions
Executable
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env ruby
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
help = <<HELP
Gollum is a multi-format Wiki Engine/API/Frontend.
Basic Command Line Usage:
gollum [options]
Options:
HELP
require 'optparse'
require 'rubygems'
require 'gollum/frontend/app'
exec = {}
options = {}
opts = OptionParser.new do |opts|
opts.banner = help
opts.on("--port [PORT]", "Bind port (default port 5432)") do |port|
options['port'] = port
end
opts.on("--version", "Display current version") do
puts "Gollum " + Gollum::VERSION
exit 0
end
end
# Read command line options into `options` hash
opts.parse!
$path = Dir.pwd
Precious::App.run!