Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function promptmysql {
- mysqlstatus=$(service mysql status)
- if [ "$mysqlstatus" = "mysql stop/waiting" ]; then
- echo "MySQL is not running";
- else
- echo -n 'MySQL seems unfortunately not to be running. Do you wish to install MySQL now? [y/n]:';
- read -n ion
- fi
- if [ "$ion" = "y" ]; then
- sudo apt-get install mysql-server mysql-client;
- read -p "You'll now have to set the root password for MySQL. Press [Enter] key to continue..."
- echo -n "Please enter your new password here:"
- read -n mypassword
- sudo mysqladmin -u root -h localhost password '$mypassword'
- read -p "Oops! First you need to create a new empty database called 'openheroes' before you continue. Press [Enter] whenever you're are done..."
- elif [ "$ion" = "n" ]; then
- echo "Without MySQL you cannot continue, please install it manually or troubleshoot why the process is not running."
- else
- echo "Oops that's no valid option!"
- promptmysql
- fi
- }
- promptmysql
- javac $(find ./* | grep .java);
- java Install.Start;
- read -p "Press [Enter] key to exit..."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement