Update haos-vm.sh

Spinner update
This commit is contained in:
tteckster 2024-04-22 06:38:43 -04:00 committed by GitHub
parent 67cad1583b
commit c042b7c527
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ GN=$(echo "\033[1;92m")
DGN=$(echo "\033[32m")
CL=$(echo "\033[m")
BFR="\\r\\033[K"
HOLD="-"
HOLD=" "
CM="${GN}${CL}"
CROSS="${RD}${CL}"
THIN="discard=on,ssd=1,"
@ -74,11 +74,11 @@ else
fi
function spinner() {
local chars="/-\|"
local spin_i=0
printf "\e[?25l"
spinner="◐◓◑◒"
spin_i=0
while true; do
printf "\b%s" "${spinner:spin_i++%${#spinner}:1}"
printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}"
sleep 0.1
done
}
@ -396,6 +396,8 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
STORAGE=${STORAGE_MENU[0]}
else
while [ -z "${STORAGE:+x}" ]; do
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
printf "\e[?25h"
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
16 $(($MSG_MAX_LENGTH + 23)) 6 \