Skip to content

Instantly share code, notes, and snippets.

@rch850
Created February 5, 2013 09:33
Show Gist options
  • Save rch850/4713332 to your computer and use it in GitHub Desktop.
Save rch850/4713332 to your computer and use it in GitHub Desktop.
ローカルにある JDK 6 の rpm.bin をインストールする
task :install_java
jdk_filename = "jdk-6u39-linux-x64-rpm.bin"
upload(jdk_filename, "/tmp/#{jdk_filename}")
run "chmod a+x /tmp/#{jdk_filename}"
run "#{sudo} /tmp/#{jdk_filename}", :pty => true do |channel, stream, data|
channel.send_data("\n") if data.start_with? "Press Enter to continue"
puts data unless data.empty?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment