Votre Nom 1 year ago
parent
commit
0dd90dabb2
1 changed files with 25 additions and 0 deletions
  1. 25 0
      prep.sh

+ 25 - 0
prep.sh

@@ -1,5 +1,30 @@
 #!/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
+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