12345678910111213141516171819202122232425262728293031 |
- #!/bin/bash
- function ubuntu_ {
- echo -e ""
- sudo apt-get update
- sudo apt-get upgrade -y
- sudo apt-get install wget build-essential bison flex libncurses-dev libssl-dev libelf-dev dwarves ubuntu-dev-tools lzop zstd -y
- sudo apt-get install debhelper -y
- exit
- }
- function redhat_ {
- echo -e ""
- sudo dnf -y groupinstall 'Development Tools'
- sudo dnf -y install ncurses-devel openssl-devel elfutils-libelf-devel python3 dwarves
- exit
- }
- clear
- PS3="Select item please: "
- items=("$(tput setaf 11)Ubuntu$(tput sgr0)" "$(tput setaf 9)Redhat$(tput sgr0)")
- echo "$(tput sgr0)Make your choice:$(tput sgr0)"
- select item in "${items[@]}" Quit
- do
- case $REPLY in
- 1) ubuntu_ ;;
- 2) redhat_ ;;
- $((${#items[@]}+1))) echo "We're done!"; break;;
- *) echo "Ooops - unknown choice $REPLY";;
- esac
- done
|