Update build.func
This commit is contained in:
parent
868fac7bd4
commit
12e400c143
@ -1096,36 +1096,23 @@ select_distribution() {
|
|||||||
while [[ -z "$var_os" ]]; do
|
while [[ -z "$var_os" ]]; do
|
||||||
exec 3>&1
|
exec 3>&1
|
||||||
|
|
||||||
if [[ "$default" == "debian" ]]; then
|
result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \
|
||||||
result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \
|
--title "DISTRIBUTION" \
|
||||||
--title "DISTRIBUTION" \
|
--radiolist "Choose Distribution:" 15 60 4 \
|
||||||
--radiolist "Choose Distribution:" 10 58 2 \
|
"debian" "" $([[ "$default" == "debian" ]] && printf "on" || printf "off") \
|
||||||
"debian" "" on \
|
"ubuntu" "" $([[ "$default" == "ubuntu" ]] && printf "on" || printf "off") \
|
||||||
"ubuntu" "" off \
|
--ok-label "Next" \
|
||||||
--ok-label "Next" \
|
--cancel-label "Exit" \
|
||||||
--cancel-label "Exit" \
|
--extra-button \
|
||||||
--extra-button \
|
--extra-label "Back" \
|
||||||
--extra-label "Back" \
|
2>&1 1>&3)
|
||||||
2>&1 1>&3)
|
|
||||||
else
|
|
||||||
result=$(dialog --backtitle "[dev] Proxmox VE Helper Scripts" \
|
|
||||||
--title "DISTRIBUTION" \
|
|
||||||
--radiolist "Choose Distribution:" 10 58 2 \
|
|
||||||
"debian" "" off \
|
|
||||||
"ubuntu" "" on \
|
|
||||||
--ok-label "Next" \
|
|
||||||
--cancel-label "Exit" \
|
|
||||||
--extra-button \
|
|
||||||
--extra-label "Back" \
|
|
||||||
2>&1 1>&3)
|
|
||||||
fi
|
|
||||||
|
|
||||||
exitcode=$?
|
exitcode=$?
|
||||||
exec 3>&-
|
exec 3>&-
|
||||||
|
|
||||||
case "$exitcode" in
|
case "$exitcode" in
|
||||||
0)
|
0)
|
||||||
if [[ -n "$result" && "$result" =~ ^(debian|ubuntu)$ ]]; then
|
if [[ "$result" =~ ^(debian|ubuntu)$ ]]; then
|
||||||
var_os="$result"
|
var_os="$result"
|
||||||
printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL"
|
printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL"
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user