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

View file

@ -66,6 +66,17 @@ ask_password() {
whiptail --title "${title}" --passwordbox "${question}" 10 40 "${default_text}" 3>&1 1>&2 2>&3; whiptail --title "${title}" --passwordbox "${question}" 10 40 "${default_text}" 3>&1 1>&2 2>&3;
return "$?"; # Not actually needed, but best to be explicit 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() { queue_postinstall_step() {
local stepname="$1"; local stepname="$1";