Ver código fonte

Update build.func

add option to choose Debian version
tteckster 2 anos atrás
pai
commit
ca4a3ecef2
1 arquivos alterados com 13 adições e 2 exclusões
  1. 13 2
      misc/build.func

+ 13 - 2
misc/build.func

@@ -143,8 +143,19 @@ advanced_settings() {
   fi
 
   if [ "$var_os" == "debian" ]; then
-    var_version="11"
-    echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}"
+    var_version=""
+    while [ -z "$var_version" ]; do
+      if var_version=$(whiptail --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \
+        "11" "Bullseye" OFF \
+        "12" "Bookworm" OFF \
+        3>&1 1>&2 2>&3); then
+        if [ -n "$var_version" ]; then
+          echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}"
+        fi
+      else
+        exit-script
+      fi
+    done
   fi
 
   if [ "$var_os" == "ubuntu" ]; then