Update haos-vm.sh
Spinner update
This commit is contained in:
parent
67cad1583b
commit
c042b7c527
1 changed files with 10 additions and 8 deletions
|
@ -33,7 +33,7 @@ GN=$(echo "\033[1;92m")
|
||||||
DGN=$(echo "\033[32m")
|
DGN=$(echo "\033[32m")
|
||||||
CL=$(echo "\033[m")
|
CL=$(echo "\033[m")
|
||||||
BFR="\\r\\033[K"
|
BFR="\\r\\033[K"
|
||||||
HOLD="-"
|
HOLD=" "
|
||||||
CM="${GN}✓${CL}"
|
CM="${GN}✓${CL}"
|
||||||
CROSS="${RD}✗${CL}"
|
CROSS="${RD}✗${CL}"
|
||||||
THIN="discard=on,ssd=1,"
|
THIN="discard=on,ssd=1,"
|
||||||
|
@ -74,11 +74,11 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function spinner() {
|
function spinner() {
|
||||||
|
local chars="/-\|"
|
||||||
|
local spin_i=0
|
||||||
printf "\e[?25l"
|
printf "\e[?25l"
|
||||||
spinner="◐◓◑◒"
|
|
||||||
spin_i=0
|
|
||||||
while true; do
|
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
|
sleep 0.1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -396,6 +396,8 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
|
||||||
STORAGE=${STORAGE_MENU[0]}
|
STORAGE=${STORAGE_MENU[0]}
|
||||||
else
|
else
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
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 \
|
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" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
|
|
Loading…
Reference in a new issue