From 997ee1ddd96c0496b0982c92d01b730ca21b8145 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Wed, 10 Dec 2008 22:28:05 +0100 Subject: allow to only have 1 option in ask_option --- TODO | 2 +- src/core/libs/lib-ui.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 1f4afb2..c66a841 100644 --- a/TODO +++ b/TODO @@ -10,7 +10,7 @@ General: Specifically: * core/interactive: fix workaround needed for installpkg exitcode -* core/interactive: keymap setting from installer does not go in $target/etc/rc.conf +* core/interactive: keymap and timezone settings from installer dan't not go in $target/etc/rc.conf * lib-ui: don't echo the results, just use the $ANSWER_ variables * core/base: implement as specified in README * core/quickinst: figure out what needs to be done and do it. diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index e79ce7b..5f2337e 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -340,7 +340,8 @@ _dia_ask_option () DEFAULT="" [ "$1" != 'no' ] && DEFAULT="--default-item $1" [ -z "$2" ] && die_error "ask_option \$2 must be the title" - [ -z "$6" ] && debug "_dia_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least 2 things (with tag and name)" + #[ -z "$6" ] && debug "_dia_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least 2 things (with tag and name)" #nothing wrong with only 1 option. it still shows useful info to the user + [ -z "$4" ] && debug "_dia_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least one option (with tag and name)" DIA_MENU_TITLE=$2 shift 2 @@ -475,7 +476,8 @@ _cli_ask_option () DEFAULT="" [ "$1" != 'no' ] && DEFAULT=$1 #TODO: if user forgot to specify a default (eg all args are 1 pos to the left, we can end up in an endless loop :s) [ -z "$2" ] && die_error "ask_option \$2 must be the title" - [ -z "$6" ] && debug "_cli_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least 2 things (with tag and name)" + #[ -z "$6" ] && debug "_cli_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least 2 things (with tag and name)" #nothing wrong with only 1 option. it still shows useful info to the user + [ -z "$4" ] && debug "_dia_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least one option (with tag and name)" CLI_MENU_TITLE=$2 shift 2 -- cgit v1.2.3-54-g00ecf