Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 13th, 2013  |  syntax: None  |  size: 0.54 KB  |  views: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. java_home = "export JAVA_HOME=/usr/lib/java/jdk1.7.0_05"
  2. path = "export PATH=$PATH:/usr/lib/java/jdk1.7.0_05/bin"
  3.  
  4. execute "make_dir" do
  5.   cwd "/usr/lib/"
  6.   user "root"
  7.   command "mkdir java"
  8. end
  9.  
  10. execute "copy" do
  11.   cwd "/usr/lib/java"
  12.   user "root"
  13.   command "cp -r /home/user/Downloads/jdk1* /usr/lib/java"
  14. end
  15.  
  16. file "/etc/profile" do
  17.   owner "root"
  18.   group "root"
  19.   action :touch
  20.   content JAVA_HOME
  21.   content PATH
  22. end
  23.        
  24. ruby_block  "set-env-java-home" do
  25.   block do
  26.     ENV["JAVA_HOME"] = java_home
  27.   end
  28. end
  29.        
  30. content "#{java_home}n#{path}"
clone this paste RAW Paste Data