bin/jgd in jgd-1.0 vs bin/jgd in jgd-1.1

- old
+ new

@@ -1,8 +1,22 @@ #!/usr/bin/env ruby STDOUT.sync = true +require 'trollop' +opts = Trollop::options do + banner <<-EOS +jgd is an automated deployer of Jekyll site to Github Pages + +Usage: jgd [options] + EOS + opt :url, "Github URL", :type=>String, :default=>'' +end + +url = opts[:url] +if url.empty? + url = `git config --get remote.origin.url` +end + spec = Gem::Specification.find_by_name("jgd") root = spec.gem_dir script = File.join(root, 'bash/deploy.sh') - -%x[ #{script} test ] +system("#{script} #{url}")