|
|
@ -0,0 +1,86 @@ |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
# TigerOS script for the removal of unwanted major-specific packages |
|
|
|
#Author: Tim Zabel <tjz8659@rit.edu> |
|
|
|
|
|
|
|
# Check to see if the current user is root |
|
|
|
if [ $EUID != 0 ] |
|
|
|
then |
|
|
|
echo "Please run this script as root (sudo $@$0)." |
|
|
|
exit |
|
|
|
fi |
|
|
|
|
|
|
|
echo -e "Welcome to the TigerOS package removal script.\n |
|
|
|
This script will remove all files and packages installed for a specific major." |
|
|
|
echo -e "\n" |
|
|
|
sleep 5; |
|
|
|
|
|
|
|
PS3='Please enter the major for the courses you wish to remove: ' |
|
|
|
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 removal script.\n |
|
|
|
This script will remove Intellij idea, PyCharm, prolog, racket, and JFLAP from your machine." |
|
|
|
while true; do |
|
|
|
read -p "Do you wish to continue? [y/n] " yn |
|
|
|
case $yn in |
|
|
|
[Yy]* ) break;; |
|
|
|
[Nn]* ) exit;; |
|
|
|
esac |
|
|
|
done |
|
|
|
# removal script cannot be done without the installer script implementing this section. |
|
|
|
;; |
|
|
|
"IT/WMC") |
|
|
|
echo -e "Welcome to the TigerOS IT/WMC package removal script.\n |
|
|
|
This script will remove mysql, mongodb, subversion, filezilla, and nodejs from your machine." |
|
|
|
while true; do |
|
|
|
read -p "Do you wish to continue? [y/n] " yn |
|
|
|
case $yn in |
|
|
|
[Yy]* ) break;; |
|
|
|
[Nn]* ) exit;; |
|
|
|
esac |
|
|
|
done |
|
|
|
sudo dnf remove mongodb subversion filezilla nodejs php mysql-repo.rpm mysql-community-server |
|
|
|
# port 27017 is still open. Need to figure out how to revert that |
|
|
|
# jGrasp installer script must be implemented before it can be removed. |
|
|
|
;; |
|
|
|
"NSSA/CIT") |
|
|
|
echo -e "Welcome to the TigerOS NSSA/CIT package removal script.\n |
|
|
|
This script will remove wireshark, python 2.7, python 3, and jGrasp from your machine." |
|
|
|
while true; do |
|
|
|
read -p "Do you wish to continue [y/n] " yn |
|
|
|
case $yn in |
|
|
|
[Yy]* ) break;; |
|
|
|
[Nn]* ) exit;; |
|
|
|
esac |
|
|
|
done |
|
|
|
sudo dnf remove wireshark python python3 |
|
|
|
# WARNING --> jGrasp has not been implemented in the installer script yet. Cannot remove |
|
|
|
echo "Install finished." |
|
|
|
exit |
|
|
|
;; |
|
|
|
"SE" ) |
|
|
|
echo -e "Welcome to the TigerOS Software Engineering removal script.\n |
|
|
|
This script will remove ruby, eclipse, Spin, sqlite3 and MIT Alloy from your machine." |
|
|
|
while true; do |
|
|
|
read -p "Do you wish to continue? [y/n] " yn |
|
|
|
case $yn in |
|
|
|
[Yy]* ) break;; |
|
|
|
[Nn]* ) exit;; |
|
|
|
esac |
|
|
|
done |
|
|
|
sudo dnf remove eclipse-jdt ruby sqlite |
|
|
|
# Spin and Alloy need to be implemented in installer script before removal. |
|
|
|
echo "All files have been removed." |
|
|
|
exit |
|
|
|
;; |
|
|
|
"Quit") |
|
|
|
break |
|
|
|
;; |
|
|
|
*) |
|
|
|
echo "Invalid Option." |
|
|
|
;; |
|
|
|
esac |
|
|
|
done |