mirror of https://github.com/tteck/Proxmox.git
parent
4ccf823d7a
commit
bdb7126a38
|
@ -17,7 +17,7 @@ CL=$(echo "\033[m")
|
||||||
CM="${GN}✓${CL}"
|
CM="${GN}✓${CL}"
|
||||||
CROSS="${RD}✗${CL}"
|
CROSS="${RD}✗${CL}"
|
||||||
BFR="\\r\\033[K"
|
BFR="\\r\\033[K"
|
||||||
HOLD="-"
|
HOLD=" "
|
||||||
|
|
||||||
# This sets error handling options and defines the error_handler function to handle errors
|
# This sets error handling options and defines the error_handler function to handle errors
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
@ -36,11 +36,11 @@ function error_handler() {
|
||||||
|
|
||||||
# This function displays a spinner.
|
# This function displays a spinner.
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue