Skip to content

Commit

Permalink
Add a --help option
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed May 12, 2008
1 parent c6a1881 commit 2690e4b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion darcs-to-git
Expand Up @@ -68,12 +68,15 @@ OPTIONS
"Only pull N patches.") do |n|
OPTIONS[:num_patches] = n
end
opts.on('-h', '--help', "Show this message") do
abort opts.to_s
end
end
opts.parse!

SRCREPO = ARGV[0]
if SRCREPO.nil?
abort opts.banner() + opts.summarize()
abort opts.to_s
elsif !FileTest.exists?(SRCREPO + '/_darcs')
abort "#{SRCREPO} is not a valid local darcs repository"
end
Expand Down

0 comments on commit 2690e4b

Please sign in to comment.