run.sh: add ask_multichoice

This commit is contained in:
Starbeamrainbowlabs 2022-04-28 03:19:32 +01:00
parent aa309ec60e
commit 3eb80707cf
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 11 additions and 0 deletions

View File

@ -66,6 +66,17 @@ ask_password() {
whiptail --title "${title}" --passwordbox "${question}" 10 40 "${default_text}" 3>&1 1>&2 2>&3;
return "$?"; # Not actually needed, but best to be explicit
}
ask_multichoice() {
local title="$1"; shift;
local args=();
while [[ "$#" -gt 0 ]]; do
args+=("$1");
args+=("$1");
shift;
done
whiptail --nocancel --notags --menu "$title" 15 40 5 "${args[@]}" 3>&1 1>&2 2>&3;
return "$?"; # Not actually needed, but best to be explicit
}
queue_postinstall_step() {
local stepname="$1";