#!/bin/bash # TigerOS postinstall package setup script # author: Aidan Kahrs # Check that the current user is root if [ $EUID != 0 ] then echo "Please run this script as root ( $@$0)." exit fi echo -e "Welcome to the TigerOS post install script.\n This script will install a set of packages used for classes in your major." echo -e "\n" sleep 5; PS3='Please enter your major: ' options=("CS" "IT/WMC" "NSSA/CIT" "SE" "Quit") select opt in "${options[@]}" do case $opt in "CS") echo -e "Welcome to the TigerOS CS package installer script.\n This script will install Intellij IDEA, PyCharm, PROLOG, Racket and JFLAP on your machine." while true; do read -p "Do you wish to continue? [y/n] " yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; esac done ./cs/idea.sh # TODO Pycharm # TODO PROLOG # TODO Racket ./cs/jflap.sh ;; "IT/WMC") echo -e "Welcome to the TigerOS IT/WMC package installer script. This script will install mysql, mongodb, subversion, filezilla, nodejs and jGRASP on you machine." while true; do read -p "Do you wish to continue? [y/n] " yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; esac done wget https://dev.mysql.com/get/mysql57-community-release-fc25-9.noarch.rpm -O mysql-repo.rpm dnf install -y mysql-repo.rpm dnf install -y mysql-community-server echo "mysql installed see "https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/" step 4 for further instructions" dnf install -y mongodb semanage port -a -t mongod_port_t -p tcp 27017 # dnf install -y httpd dnf install -y subversion filezilla nodejs php #call jGRASP script here mysql_secure_installation echo "Install finished" exit ;; "NSSA/CIT") echo -e "Welcome to the TigerOS NSSA/CIT package installer script.\n This script will install wireshark, python 2.7, python 3 and jGrasp on you machine." while true; do read -p "Do you wish to continue? [y/n] " yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; esac done dnf install -y wireshark-gtk python python3 #call jGrasp installer script here echo "Install finished" exit ;; "SE") echo -e "Welcome to the TigerOS SE package installer script.\n This script will install ruby, eclipse, Spin, sqlite3, plantUML, gitk and MIT Alloy on you machine." while true; do read -p "Do you wish to continue? [y/n] " yn case $yn in [Yy]* ) break;; [Nn]* ) exit;; esac done dnf install -y eclipse-jdt ruby sqlite plantuml gitk geany ./se/spin.sh && ./se/alloy.sh echo "Install finished" exit ;; "Quit") break ;; *) echo invalid option;; esac done