Advertisement
Guest User

Java Installer Script

a guest
May 5th, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.30 KB | None | 0 0
  1. #!/bin/bash
  2. #Java Installer Script
  3. #Menu
  4. echo 'Welcome to the Java Installer Script for Ubuntu Linux, what type of Java would you like to install? Enter in the corresponding number for your desired option.'
  5. echo '1. Oracle Java'
  6. echo '2. Open JDK'
  7. read Idea
  8. echo
  9.  
  10. #Oracle Java Installation
  11.      if [[ $Idea == 1 ]]; then
  12.       echo 'Keep in mind you will be asked to input your password, this is needed to add the repository and install Java itself, follow the dialog and you should be fine.'
  13.          sleep 5
  14.    sudo add-apt-repository ppa:webupd8team/java
  15.          sudo apt-get update
  16.      sudo apt-get install oracle-java7-installer
  17.          echo 'Oracle Java is now installed! It should update by itself through the update manager. Thanks for using the Java Installer!'
  18.       sleep 4
  19.  
  20. #Open JDK Installation
  21. elif [[ $Idea == 2 ]]; then
  22.   echo 'Keep in mind you will be asked to input your password, this is needed to add the repository and install Java itself, follow the dialog and you should be fine.'
  23.   sleep 5
  24. sudo apt-get install openjdk-7-jdk
  25.    echo 'Open JDK is now installed! It should update by itself through the update manager. Thanks for using the Java Installer!'
  26. sleep 5
  27.  
  28. # If option isn't chosen
  29. else
  30. echo 'Please select an option.. returning to main menu..'
  31. sleep 2
  32. ./jinstaller
  33. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement