prep.sh 810 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. function ubuntu_ {
  3. echo -e ""
  4. sudo apt-get update
  5. sudo apt-get upgrade -y
  6. sudo apt-get install wget build-essential bison flex libncurses-dev libssl-dev libelf-dev dwarves ubuntu-dev-tools lzop zstd -y
  7. sudo apt-get install debhelper -y
  8. exit
  9. }
  10. function redhat_ {
  11. echo -e ""
  12. sudo dnf -y groupinstall 'Development Tools'
  13. sudo dnf -y install ncurses-devel openssl-devel elfutils-libelf-devel python3 dwarves
  14. exit
  15. }
  16. clear
  17. PS3="Select item please: "
  18. items=("$(tput setaf 11)Ubuntu$(tput sgr0)" "$(tput setaf 9)Redhat$(tput sgr0)")
  19. echo "$(tput sgr0)Make your choice:$(tput sgr0)"
  20. select item in "${items[@]}" Quit
  21. do
  22. case $REPLY in
  23. 1) ubuntu_ ;;
  24. 2) redhat_ ;;
  25. $((${#items[@]}+1))) echo "We're done!"; break;;
  26. *) echo "Ooops - unknown choice $REPLY";;
  27. esac
  28. done