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.

91 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 dnf 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. ./cs/idea.sh --remove # removes Intellij IDEA
  31. ./cs/logisim.sh --remove # removes logisim
  32. ./cs/jflap.sh --remove # removes JFLAP
  33. ;;
  34. "IT/WMC")
  35. echo -e "Welcome to the TigerOS IT/WMC package removal script.\n
  36. This script will remove mysql, mongodb, subversion, filezilla, and nodejs from your machine."
  37. while true; do
  38. read -p "Do you wish to continue? [y/n] " yn
  39. case $yn in
  40. [Yy]* ) break;;
  41. [Nn]* ) exit;;
  42. esac
  43. done
  44. sudo dnf -y remove mongodb subversion filezilla nodejs php mysql-repo.rpm mysql-community-server
  45. semanage port -d -t mongod_port_t -p tcp 27017
  46. firewall-cmd --del-port=22017/tcp --permanent && firewall-cmd --reload
  47. # jGrasp installer script must be implemented before it can be removed.
  48. ;;
  49. "NSSA/CIT")
  50. echo -e "Welcome to the TigerOS NSSA/CIT package removal script.\n
  51. This script will remove wireshark, python 2.7, python 3, and jGrasp from your machine."
  52. while true; do
  53. read -p "Do you wish to continue [y/n] " yn
  54. case $yn in
  55. [Yy]* ) break;;
  56. [Nn]* ) exit;;
  57. esac
  58. done
  59. sudo dnf -y remove wireshark
  60. # WARNING --> jGrasp has not been implemented in the installer script yet. Cannot remove
  61. echo "Install finished."
  62. exit
  63. ;;
  64. "SE" )
  65. echo -e "Welcome to the TigerOS Software Engineering removal script.\n
  66. This script will remove ruby, eclipse, Spin, sqlite3 and MIT Alloy from your machine."
  67. while true; do
  68. read -p "Do you wish to continue? [y/n] " yn
  69. case $yn in
  70. [Yy]* ) break;;
  71. [Nn]* ) exit;;
  72. esac
  73. done
  74. sudo dnf -y remove eclipse-jdt ruby sqlite gitk plantuml
  75. ./se/spin.sh --remove
  76. ./se/alloy.sh --remove
  77. echo "All files have been removed."
  78. exit
  79. ;;
  80. "Quit")
  81. break
  82. ;;
  83. *)
  84. echo "Invalid Option."
  85. ;;
  86. esac
  87. done