summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libui.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/libui.sh b/libui.sh
index 8f6ede3..11f6865 100644
--- a/libui.sh
+++ b/libui.sh
@@ -15,6 +15,8 @@
libui_sh_init ()
{
LIBUI_UI=${1:-cli}
+ allowed_uis=('cli' 'dia')
+ check_is_in "$LIBUI_UI" "${allowed_uis[@]}" || die_error "libui_sh_init \$1 must be one of 'cli', 'dia' or '' (for cli)"
[ "$LIBUI_UI" == 'dialog' ] && ! which dialog &>/dev/null && die_error "Required dependency dialog not found"
LIBUI_TMP_DIR=/tmp
if [ -n "$2" ]; then