From 2228c92e9cd8d235065732c464b21778253c5485 Mon Sep 17 00:00:00 2001 From: natemaia Date: Sat, 30 May 2020 11:21:30 -0700 Subject: [PATCH] Update --- installer | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/installer b/installer index 1589f2d..2ca3b10 100755 --- a/installer +++ b/installer @@ -2287,7 +2287,7 @@ install_background() BG_PID=$! # shellcheck disable=SC2064 - trap "kill $BG_PID 2> /dev/null" EXIT + trap "kill $BG_PID 2> /dev/null; tput cnorm" EXIT } ############################################################################### @@ -3461,16 +3461,26 @@ while getopts ":htl:Dnr:b:m:d:" OPT; do m) MNT="$OPTARG" ;; d) DIST="$OPTARG" ;; r) - [[ -b $OPTARG ]] || { msg "Invalid Root" "\nThe installer expects a full path to a block device for root.\n\nExiting..\n" 2; die 1; } + if [[ ! -b $OPTARG ]]; then + msg "Invalid Root" "\nThe installer expects a full path to a block device for root.\n\nExiting..\n" 2 + die 1 + fi ROOT="$OPTARG" ;; b) - [[ -b $OPTARG ]] || { msg "Invalid Boot" "\nThe installer expects a full path to a block device for boot.\n\nExiting..\n" 2; die 1; } + if [[ ! -b $OPTARG ]]; then + msg "Invalid Boot" "\nThe installer expects a full path to a block device for boot.\n\nExiting..\n" 2 + die 1 + fi BOOT="$OPTARG" ;; l) - [[ "${!WM_SESSIONS[*]}" =~ $OPTARG ]] || { echo "error: invalid session for -l, see -h for help"; die 1; } - live "$OPTARG" + if [[ "${!WM_SESSIONS[*]}" =~ $OPTARG ]]; then + live "$OPTARG" + else + echo "error: invalid session for -l, see -h for a list of available sessions" + die 1 + fi ;; \?) echo "invalid option: $OPTARG"