Skip to content

Commit

Permalink
Updated bin messages
Browse files Browse the repository at this point in the history
  • Loading branch information
smith committed Jun 10, 2009
1 parent 52bfe67 commit 6e09652
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/js2bookmarklet
Expand Up @@ -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
Expand All @@ -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
Binary file modified pkg/js2bookmarklet-0.0.1.gem
Binary file not shown.

0 comments on commit 6e09652

Please sign in to comment.