Update haos-vm-v4.sh

This commit is contained in:
tteckster 2022-08-29 19:34:29 -04:00 committed by GitHub
parent 40897f22c5
commit b21ce7b82e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 32 additions and 27 deletions

View File

@ -16,6 +16,7 @@ CL=`echo "\033[m"`
BFR="\\r\\033[K"
HOLD="-"
CM="${GN}${CL}"
CROSS="${RD}${CL}"
set -o errexit
set -o errtrace
set -o nounset
@ -79,6 +80,11 @@ function msg_ok() {
local msg="$1"
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
}
function msg_error() {
local msg="$1"
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
}
function default_settings() {
echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}"
BRANCH=${STABLE}
@ -210,8 +216,7 @@ STORAGE_MENU+=( "$TAG" "$ITEM" "OFF" )
done < <(pvesm status -content images | awk 'NR>1')
VALID=$(pvesm status -content images | awk 'NR>1')
if [ -z "$VALID" ]; then
echo -e "\n${RD}⚠ Unable to detect a valid storage location.${CL}"
echo -e "Exiting..."
msg_error "Unable to detect a valid storage location."
exit
elif [ $((${#STORAGE_MENU[@]}/3)) -eq 1 ]; then
STORAGE=${STORAGE_MENU[0]}