Created
March 8, 2010 18:30
-
-
Save shadowbq/325430 to your computer and use it in GitHub Desktop.
ruby steb file for eclipse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Client script for Linux Shell Eclipse Bridge (steb) | |
# shadowbq | |
require 'logger' | |
require 'socket' | |
log = Logger.new(File.dirname(__FILE__) + "/rbsteb.log") | |
log.level = Logger::INFO | |
log.info("loading new file") | |
port = 4404 | |
if ARGV.size <= 0 | |
log.fatal "No Filename passed to rbsteb!" | |
exit 1 | |
end | |
filename = ARGV[0] | |
log.info "opening file: \"#{filename}\"" | |
if !(File.exist?(filename)) | |
log.warn "failed to find file: \"#{filename}\"" | |
exit 2 | |
end | |
@socket = TCPSocket.open("localhost", port) | |
@socket.write(filename) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment