From 3eb80707cf018692ecb7dbbb6b1baab1adf189d0 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 28 Apr 2022 03:19:32 +0100 Subject: [PATCH] run.sh: add ask_multichoice --- src/run.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/run.sh b/src/run.sh index 75a1b91..52ae24a 100755 --- a/src/run.sh +++ b/src/run.sh @@ -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";