diff --git a/bin/jekyll b/bin/jekyll index a8471a22067..e70e1058f0d 100755 --- a/bin/jekyll +++ b/bin/jekyll @@ -2,8 +2,28 @@ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib]) +require 'optparse' require 'jekyll' +opts = OptionParser.new do |opts| + opts.banner = <<-EOF +Jekyll is a blog-aware, static site generator. + +Basic Command Line Usage: + jekyll # . -> ./_site + jekyll # . -> + jekyll # -> + + Options: +EOF + + opts.on("--auto", "Auto-regenerate") do + options[:auto] = true + end +end + +opts.parse! + case ARGV.size when 0 dest = File.join('.', '_site') @@ -16,12 +36,4 @@ case ARGV.size Jekyll.process(ARGV[0], ARGV[1]) else puts DATA.read -end - -__END__ -Jekyll is a blog-aware, static site generator. - -Basic Command Line Usage: - jekyll # . -> ./_site - jekyll # . -> - jekyll # -> \ No newline at end of file +end \ No newline at end of file