diff --git a/bin/js2bookmarklet b/bin/js2bookmarklet index 16716af..9810af9 100755 --- a/bin/js2bookmarklet +++ b/bin/js2bookmarklet @@ -4,15 +4,17 @@ require 'optparse' begin require 'js2bookmarklet' rescue LoadError => e - puts "The js2bookmarklet gem is required" - exit + puts "Error: The js2bookmarklet gem is required" + exit 1 end options = {} input_file = ARGV.last output_file = nil +usage = "Usage: js2bookmarklet [options] [input file]" + OptionParser.new do |opts| - opts.banner = "Usage: js2bookmarklet [options] [input file]" + opts.banner = usage opts.on("-o [file name]", "--output [file name]", "Output file") do |o| output_file = o end @@ -33,6 +35,7 @@ if File.exists?(input_file.to_s) puts output end else + puts usage puts "Error: Input file does not exist" exit 1 end diff --git a/pkg/js2bookmarklet-0.0.1.gem b/pkg/js2bookmarklet-0.0.1.gem index caa5e5b..bb748f9 100644 Binary files a/pkg/js2bookmarklet-0.0.1.gem and b/pkg/js2bookmarklet-0.0.1.gem differ