This commit is contained in:
natemaia 2020-05-30 11:21:30 -07:00
parent d6c2a29c14
commit 2228c92e9c

View File

@ -2287,7 +2287,7 @@ install_background()
BG_PID=$! BG_PID=$!
# shellcheck disable=SC2064 # 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" ;; m) MNT="$OPTARG" ;;
d) DIST="$OPTARG" ;; d) DIST="$OPTARG" ;;
r) 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" ROOT="$OPTARG"
;; ;;
b) 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" BOOT="$OPTARG"
;; ;;
l) l)
[[ "${!WM_SESSIONS[*]}" =~ $OPTARG ]] || { echo "error: invalid session for -l, see -h for help"; die 1; } if [[ "${!WM_SESSIONS[*]}" =~ $OPTARG ]]; then
live "$OPTARG" live "$OPTARG"
else
echo "error: invalid session for -l, see -h for a list of available sessions"
die 1
fi
;; ;;
\?) \?)
echo "invalid option: $OPTARG" echo "invalid option: $OPTARG"