Fedora Remix maintained by the Rochester Institute of Technology (RIT) Linux Users Group, targeted at users new to Linux and RIT students, faculty, and staff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
3.4 KiB

  1. #!/bin/bash
  2. # TigerOS script for the removal of unwanted major-specific packages
  3. # Author: Tim Zabel <tjz8659@rit.edu>
  4. # Check to see if the current user is root
  5. if [ $EUID != 0 ]
  6. then
  7. echo "Please run this script as root (sudo $@$0)."
  8. exit
  9. fi
  10. echo -e "Welcome to the TigerOS package removal script.\n
  11. This script will remove all files and packages installed for a specific major."
  12. echo -e "\n"
  13. sleep 5;
  14. PS3='Please enter the major for the courses you wish to remove: '
  15. options=("CS" "IT/WMC" "NSSA/CIT" "SE" "Quit")
  16. select opt in "${options[@]}"
  17. do
  18. # all commands here are done with the -y flag. Individual removals do not ask the user for permission beforehand
  19. case $opt in
  20. "CS")
  21. echo -e "Welcome to the TigerOS CS package removal script.\n
  22. This script will remove Intellij idea, PyCharm, prolog, racket, and JFLAP from your machine."
  23. while true; do
  24. read -p "Do you wish to continue? [y/n] " yn
  25. case $yn in
  26. [Yy]* ) break;;
  27. [Nn]* ) exit;;
  28. esac
  29. done
  30. # removal script cannot be done without the installer script implementing this section.
  31. ;;
  32. "IT/WMC")
  33. echo -e "Welcome to the TigerOS IT/WMC package removal script.\n
  34. This script will remove mysql, mongodb, subversion, filezilla, and nodejs from your machine."
  35. while true; do
  36. read -p "Do you wish to continue? [y/n] " yn
  37. case $yn in
  38. [Yy]* ) break;;
  39. [Nn]* ) exit;;
  40. esac
  41. done
  42. sudo dnf -y remove mongodb subversion filezilla nodejs php mysql-repo.rpm mysql-community-server
  43. semanage port -d -t mongod_port_t -p tcp 27017
  44. firewall-cmd --del-port=22017/tcp --permanent && firewall-cmd --reload
  45. # jGrasp installer script must be implemented before it can be removed.
  46. ;;
  47. "NSSA/CIT")
  48. echo -e "Welcome to the TigerOS NSSA/CIT package removal script.\n
  49. This script will remove wireshark, python 2.7, python 3, and jGrasp from your machine."
  50. while true; do
  51. read -p "Do you wish to continue [y/n] " yn
  52. case $yn in
  53. [Yy]* ) break;;
  54. [Nn]* ) exit;;
  55. esac
  56. done
  57. sudo dnf -y remove wireshark python python3
  58. # WARNING --> jGrasp has not been implemented in the installer script yet. Cannot remove
  59. echo "Install finished."
  60. exit
  61. ;;
  62. "SE" )
  63. echo -e "Welcome to the TigerOS Software Engineering removal script.\n
  64. This script will remove ruby, eclipse, Spin, sqlite3 and MIT Alloy from your machine."
  65. while true; do
  66. read -p "Do you wish to continue? [y/n] " yn
  67. case $yn in
  68. [Yy]* ) break;;
  69. [Nn]* ) exit;;
  70. esac
  71. done
  72. sudo dnf -y remove eclipse-jdt ruby sqlite gitk plantuml
  73. # Spin and Alloy need to be implemented in installer script before removal.
  74. echo "All files have been removed."
  75. exit
  76. ;;
  77. "Quit")
  78. break
  79. ;;
  80. *)
  81. echo "Invalid Option."
  82. ;;
  83. esac
  84. done