Advertisement
Guest User

andy

a guest
Jul 28th, 2009
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ## First we make the working directory
  4. sudo mkdir /tmp/pluginstall
  5.  
  6. #choose version of ubuntu
  7. #Input code browser
  8. function strinput {
  9. unset refstr
  10. echo -n "$1"
  11. read refstr
  12. }
  13.  
  14. ## Ask if they agree to file bug reports, sort of a reminder
  15. echo
  16. echo " This script is used to setup the Sun Java 64bit beta "
  17. echo " and plugin b03. By entering yes below you acknowlage that"
  18. echo " you are installing development software and you "
  19. echo " will file bug reports with Sun for every "
  20. echo " problem you incounter."
  21. echo
  22. echo " Do you agree? yes or no : "
  23.  
  24.  
  25. if [ "$installtype" = "" ]
  26. then
  27. echo -n "(please type the whole word in lower case letters)"
  28. strinput
  29. else
  30. refstr=$installtype
  31. fi
  32.  
  33. if [ "$refstr" = "yes" ]
  34. then
  35. echo "Java installing."
  36.  
  37.  
  38. ## First we uninstall and remove all the existing java plugins
  39. sudo apt-get -y purge icedtea6-plugin
  40. sudo rm -f /usr/lib/firefox-addons/plugins/libnpjp2.so
  41. sudo rm -f /usr/lib/firefox-addons/plugins/libjavaplugin_oji.so
  42. sudo rm -f /usr/lib/mozilla/plugins/libnpjp2.so
  43. sudo rm -f /usr/lib/mozilla/plugins/libjavaplugin_oji.so
  44.  
  45. ## Then we download the new plugin
  46. cd /tmp/pluginstall
  47. sudo wget http://www.java.net/download/jdk6/6u12/promoted/b03/binaries/jre-6u12-ea-bin-b03-linux-amd64-22_dec_2008.bin
  48.  
  49. ## Next we extract and place the plugin
  50. sudo sh ./jre-6u12-ea-bin-b03-linux-amd64-22_dec_2008.bin
  51. sudo cp -r jre1.6.0_12 /usr/lib/jvm/
  52. sudo ln -s /usr/lib/jvm/jre1.6.0_12/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/
  53. sudo ln -s /usr/lib/jvm/jre1.6.0_12/lib/amd64/libnpjp2.so /usr/lib/firefox-addons/plugins/
  54.  
  55.  
  56. elif [ "$refstr" = "no" ]
  57. then
  58. echo "I am sorry but you have to agree. "
  59.  
  60. else
  61. echo " I am sorry but you have to agree. "
  62. echo
  63. fi
  64.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement