do not use DATA, rubygems freaks out
This commit is contained in:
		
							parent
							
								
									f5c727fadb
								
							
						
					
					
						commit
						8dff479a13
					
				
							
								
								
									
										25
									
								
								bin/jekyll
								
								
								
								
							
							
						
						
									
										25
									
								
								bin/jekyll
								
								
								
								
							|  | @ -2,13 +2,24 @@ | ||||||
| 
 | 
 | ||||||
| $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib]) | $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib]) | ||||||
| 
 | 
 | ||||||
|  | help = <<HELP | ||||||
|  | Jekyll is a blog-aware, static site generator. | ||||||
|  | 
 | ||||||
|  | Basic Command Line Usage: | ||||||
|  |   jekyll                                                   # . -> ./_site | ||||||
|  |   jekyll <path to write generated site>                    # . -> <path> | ||||||
|  |   jekyll <path to source> <path to write generated site>   # <path> -> <path> | ||||||
|  |      | ||||||
|  |   Options: | ||||||
|  | HELP | ||||||
|  | 
 | ||||||
| require 'optparse' | require 'optparse' | ||||||
| require 'jekyll' | require 'jekyll' | ||||||
| 
 | 
 | ||||||
| options = {} | options = {} | ||||||
| 
 | 
 | ||||||
| opts = OptionParser.new do |opts| | opts = OptionParser.new do |opts| | ||||||
|   opts.banner = DATA.read |   opts.banner = help | ||||||
| 
 | 
 | ||||||
|   opts.on("--auto", "Auto-regenerate") do |   opts.on("--auto", "Auto-regenerate") do | ||||||
|     options[:auto] = true |     options[:auto] = true | ||||||
|  | @ -67,14 +78,4 @@ if options[:auto] | ||||||
|   loop { sleep 1000 } |   loop { sleep 1000 } | ||||||
| else | else | ||||||
|   Jekyll.process(source, destination) |   Jekyll.process(source, destination) | ||||||
| end | end | ||||||
| 
 |  | ||||||
| __END__ |  | ||||||
| Jekyll is a blog-aware, static site generator. |  | ||||||
| 
 |  | ||||||
| Basic Command Line Usage: |  | ||||||
|   jekyll                                                   # . -> ./_site |  | ||||||
|   jekyll <path to write generated site>                    # . -> <path> |  | ||||||
|   jekyll <path to source> <path to write generated site>   # <path> -> <path> |  | ||||||
|      |  | ||||||
|   Options: |  | ||||||
		Loading…
	
		Reference in New Issue