#!/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=("Ubuntu" "Redhat") echo "Make your choice:" 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