From ed71912ea2c7e93c6e439782657a7a8a0cee0b82 Mon Sep 17 00:00:00 2001 From: axtloss <3alouchi2006@gmail.com> Date: Fri, 8 Oct 2021 17:45:43 +0200 Subject: [PATCH] fixed dialog in chroot TODO: yesno dialogs still wanky --- citrine.internal.sh | 9 +++------ continue.sh | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/citrine.internal.sh b/citrine.internal.sh index 884e2de..e2cf73a 100755 --- a/citrine.internal.sh +++ b/citrine.internal.sh @@ -17,8 +17,7 @@ prompt() { # --------------------------------- yn="" yesno() { - dialog --title Citrine --yesno "$@" 10 80 - yn="$?" + yn=$(dialog --title Citrine --yesno "$@" --stdout 10 80) } dumptitle="" @@ -28,9 +27,7 @@ dump() { msgdat="" msgbox(){ - dialog --title Citrine --inputbox "$@" 10 80 2>tmp.citrine - msgdat=$(cat tmp.citrine) - rm tmp.citrine + msgdat=$(dialog --title Citrine --inputbox "$@" --stdout 10 80) } # -------------------------- @@ -210,7 +207,7 @@ fi inf "Setting up base Crystal System" -crystalstrap /mnt base linux linux-firmware systemd-sysvcompat networkmanager grub crystal-grub-theme man-db man-pages texinfo nano sudo curl archlinux-keyring neofetch +crystalstrap /mnt base linux linux-firmware systemd-sysvcompat networkmanager grub crystal-grub-theme man-db man-pages texinfo nano sudo curl archlinux-keyring neofetch dialog if [[ ! "$?" == "0" ]]; then inf "CrystalStrap had some error. Retrying." crystalstrap /mnt base linux linux-firmware systemd-sysvcompat networkmanager grub crystal-grub-theme man-db man-pages texinfo nano sudo curl archlinux-keyring neofetch dialog diff --git a/continue.sh b/continue.sh index 6398897..f1c3337 100755 --- a/continue.sh +++ b/continue.sh @@ -17,20 +17,17 @@ prompt() { # --------------------------------- yn="" yesno() { - dialog --title Citrine --yesno "$@" 10 80 - yn="$?" + yn=$(dialog --title Citrine --yesno "$@" --stdout 10 80) } dumptitle="" dump() { - dialog --title $dumptitle --no-collapse --msgbox "$@" 0 0 + dialog --title "${dumptitle}" --no-collapse --msgbox "$@" 0 0 } msgdat="" msgbox(){ - dialog --title Citrine --inputbox "$@" 10 80 2>tmp.citrine - msgdat=$(cat tmp.citrine) - rm tmp.citrine + msgdat=$(dialog --title Citrine --inputbox "$@" --stdout 10 80) } # --------------------------