From 07a8203e50084fa399012e5d14447405199d9a64 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sat, 6 Dec 2008 15:25:34 -0800 Subject: [PATCH] redo refactor --- bin/jekyll | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/bin/jekyll b/bin/jekyll index a1d09d19..cd4c42bc 100755 --- a/bin/jekyll +++ b/bin/jekyll @@ -15,32 +15,35 @@ end opts.parse! -def process_local_to_local - dest = File.join('.', '_site') +def clean(dest) FileUtils.rm_rf(dest) FileUtils.mkdir_p(dest) - Jekyll.process('.', dest) end -def process_local_to_path - Jekyll.process('.', ARGV[0]) +def globs + end -def process_path_to_path - Jekyll.process(ARGV[0], ARGV[1]) -end +source = nil +destination = nil case ARGV.size when 0 - process_local_to_local + source = '.' + destination = File.join('.', '_site') when 1 - process_local_to_path + source = '.' + destination = ARGV[0] when 2 - process_path_to_path + source = ARGV[0] + destination = ARGV[1] else puts "Invalid options. Run `jekyll --help` for assistance." + exit(1) end +Jekyll.process(source, destination) + __END__ Jekyll is a blog-aware, static site generator.