Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Java Installer Script
- #Menu
- 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.'
- echo '1. Oracle Java'
- echo '2. Open JDK'
- read Idea
- echo
- #Oracle Java Installation
- if [[ $Idea == 1 ]]; then
- 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.'
- sleep 5
- sudo add-apt-repository ppa:webupd8team/java
- sudo apt-get update
- sudo apt-get install oracle-java7-installer
- echo 'Oracle Java is now installed! It should update by itself through the update manager. Thanks for using the Java Installer!'
- sleep 4
- #Open JDK Installation
- elif [[ $Idea == 2 ]]; then
- 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.'
- sleep 5
- sudo apt-get install openjdk-7-jdk
- echo 'Open JDK is now installed! It should update by itself through the update manager. Thanks for using the Java Installer!'
- sleep 5
- # If option isn't chosen
- else
- echo 'Please select an option.. returning to main menu..'
- sleep 2
- ./jinstaller
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement