diff options
author | Matthew Bloch <mattbee@yoga.home.bloch.tv> | 2014-11-05 14:28:42 +0000 |
---|---|---|
committer | Matthew Bloch <mattbee@yoga.home.bloch.tv> | 2014-11-05 14:28:42 +0000 |
commit | ceb4dfa6003071c8dd5d21417bf26c2701ddb8d8 (patch) | |
tree | 26235c1bbf66e0df165d99a4ffa90de8e63c14f6 /byteback-receive | |
parent | c88333e19b459685f57ba3f246c3fdd684681542 (diff) |
A few more bug fixes from the last refactoring.
Diffstat (limited to 'byteback-receive')
-rwxr-xr-x | byteback-receive | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/byteback-receive b/byteback-receive index e6e7798..f93dfd3 100755 --- a/byteback-receive +++ b/byteback-receive @@ -8,12 +8,7 @@ $LOAD_PATH << '/usr/lib/byteback' require 'trollop' -def error(message) - STDERR.print "*** #{message}\n" - exit 1 -end - -#STDERR.print "ARGV=#{ARGV.inspect}\nSSH_ORIGINAL_COMMAND=#{ENV['SSH_ORIGINAL_COMMAND']}\n" +#debug "ARGV=#{ARGV.inspect}\nSSH_ORIGINAL_COMMAND=#{ENV['SSH_ORIGINAL_COMMAND']}\n" if ENV['SSH_ORIGINAL_COMMAND'] ARGV.concat(ENV['SSH_ORIGINAL_COMMAND'].split(" ")) @@ -22,10 +17,10 @@ end #STDERR.print "after ARGV=#{ARGV.inspect}\n" byteback_host = ENV['BYTEBACK_HOST'] -error("BYTEBACK_HOST environment not set") unless byteback_host +fatal("BYTEBACK_HOST environment not set") unless byteback_host byteback_root = ENV['HOME'] + "/" + ENV["BYTEBACK_HOST"] -error("#{byteback_root} does not exist") unless File.directory?(byteback_root) +fatal("#{byteback_root} does not exist") unless File.directory?(byteback_root) # force destination to be where we expect # |