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"