Update build.func
This commit is contained in:
parent
d418508bb2
commit
5ae0c340e5
@ -1097,8 +1097,6 @@ select_distribution() {
|
||||
[[ "$default" == "debian" ]] && debian_flag="on" || debian_flag="off"
|
||||
[[ "$default" == "ubuntu" ]] && ubuntu_flag="on" || ubuntu_flag="off"
|
||||
|
||||
printf "DEBUG: default=%s | debian_flag=%s | ubuntu_flag=%s\n" "$default" "$debian_flag" "$ubuntu_flag"
|
||||
|
||||
while [[ -z "$var_os" ]]; do
|
||||
exec 3>&1
|
||||
result=$(dialog --clear \
|
||||
@ -1115,8 +1113,6 @@ select_distribution() {
|
||||
exitcode=$?
|
||||
exec 3>&-
|
||||
|
||||
printf "DEBUG: exitcode=%s | result=%s\n" "$exitcode" "$result"
|
||||
|
||||
case "$exitcode" in
|
||||
0)
|
||||
if [[ "$result" =~ ^(debian|ubuntu)$ ]]; then
|
||||
@ -1124,19 +1120,17 @@ select_distribution() {
|
||||
printf "%bOperating System: %b%s%b\n" "$OS$BOLD$DGN" "$BGN" "$var_os" "$CL"
|
||||
return 0
|
||||
else
|
||||
printf "DEBUG: Invalid result on OK: '%s'\n" "$result"
|
||||
printf "[DEBUG] No valid selection made (result='%s'), repeating...\n" "$result"
|
||||
fi
|
||||
;;
|
||||
3)
|
||||
printf "DEBUG: User pressed Back (exitcode 3)\n"
|
||||
return 2
|
||||
;;
|
||||
1 | 255)
|
||||
printf "DEBUG: User pressed Cancel or ESC (exitcode: %s)\n" "$exitcode"
|
||||
return 1
|
||||
;;
|
||||
*)
|
||||
printf "DEBUG: Unknown exitcode: %s\n" "$exitcode"
|
||||
printf "[DEBUG] Unexpected exit code: %s\n" "$exitcode" >&2
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
Loading…
x
Reference in New Issue
Block a user