diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-04 00:02:12 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-04 00:02:12 +0100 |
commit | 081052708813ff6b7fc6d492eff91f67f49c78bd (patch) | |
tree | 80d5b29237b79126149336beff70128dd08cb5e7 /src | |
parent | 54f9b600ef36935904c22c9702e1c5fa540f2055 (diff) |
beautified the code a bit more
Diffstat (limited to 'src')
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 13859ea..2b2859a 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -391,11 +391,7 @@ interactive_select_packages() { # set up our install location if necessary and sync up # so we can get package lists - target_prepare_pacman - if [ $? -ne 0 ]; then - notify "Pacman preparation failed! Check $LOG for errors." - return 1 - fi + target_prepare_pacman || ( notify "Pacman preparation failed! Check $LOG for errors." && return 1 ) # show group listing for group selection local _catlist="base ^ ON" @@ -644,17 +640,13 @@ interactive_select_source() var_SYNC_URL= var_MIRRORLIST="/etc/pacman.d/mirrorlist" - _dia_DIALOG --menu "Please select an installation source" 10 35 3 \ + ask_option no "Please select an installation source" \ "1" "CD-ROM or OTHER SOURCE" \ - "2" "FTP/HTTP" 2>$ANSWER - - case $(cat $ANSWER) in - "1") - var_PKG_SOURCE_TYPE="cd" - ;; - "2") - var_PKG_SOURCE_TYPE="ftp" - ;; + "2" "FTP/HTTP" + + case $ANSWER_OPTION in + "1") var_PKG_SOURCE_TYPE="cd" ;; + "2") var_PKG_SOURCE_TYPE="ftp" ;; esac if [ "$var_PKG_SOURCE_TYPE" = "cd" ]; then |