diff --git a/entry.sh b/entry.sh index 9e4e277..e6762bc 100755 --- a/entry.sh +++ b/entry.sh @@ -36,6 +36,7 @@ function first_stage(){ echo debootstrap sid $TARGET debootstrap sid $TARGET + choose_dialog } function second_stage(){ @@ -45,8 +46,9 @@ function second_stage(){ function test_fun(){ #choose_one test1 | prefix_time #sleep 1 - block_devices | choose_one - - echo "> "$test + #block_devices | choose_one - + #echo "> "$test + choose_dialog #sleep 1 #choose_one | prefix_time } diff --git a/utils.sh b/utils.sh index 413dde7..8507f46 100755 --- a/utils.sh +++ b/utils.sh @@ -37,6 +37,28 @@ function choose_one(){ fi } +function choose_dialog(){ + +: ${DIALOG:=dialog} +OPTS="$OPTS --cr-wrap" +high=10 + +rows=$(stty size | cut -d' ' -f1) +[ -z "$rows" ] && rows=$high +[ $rows -gt $high ] && rows=$high +cols=$(stty size | cut -d' ' -f2) +#$DIALOG --backtitle "Package configuration" \ +# --title "Configuring sun-java6-jre" \ +# $OPTS \ +# --yesno '\nIn order to install this package, you must accept the license terms, the "Operating System Distributor License for Java" (DLJ), v1.1. Not accepting will cancel the installation.\n\nDo you accept the DLJ license terms?' $rows $((cols - 5)) + +$DIALOG --backtitle "Package configuration" \ + --title "Configuring sun-java6-jre" \ + $OPTS \ + --menu '\nfoo bar?' $rows $((cols - 5)) 8 foo 1 bar 3 bat 3 + +} + function block_devices(){ #lsblk -fPpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT lsblk -frpno NAME