Permalink
Browse files

Added usage info.

  • Loading branch information...
1 parent 22d4c7a commit 6c098e1f81c1663e2a9eaeb8d767ef7041e2e9ea @tomlea committed Mar 29, 2009
Showing with 8 additions and 0 deletions.
  1. +8 −0 bin/popthis
View
8 bin/popthis
@@ -1,6 +1,14 @@
#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), *%w[.. lib pop_this])
+if ARGV.include?("-h") or ARGV.include?("--help")
+ puts "popthis: Serves a directory via pop3."
+ puts " Usage: popthis [port] [path]"
+ puts "Default port: 2220"
+ puts "Default path: current working directory"
+ exit 1
+end
+
if ARGV.first and ARGV.first =~ /^[0-9]{2,6}$$/
port = ARGV.shift.to_i
else

0 comments on commit 6c098e1

Please sign in to comment.