From 5f3bd5904eb186d315c17e0412b8eec4b881eaef Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 7 Jan 2024 10:50:17 -0500 Subject: [PATCH] Update alpine-install.func no spinner allowed --- misc/alpine-install.func | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index e7b8cf08..39e76d8f 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -34,8 +34,6 @@ catch_errors() { } error_handler() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - tput cnorm local exit_code="$?" local line_number="$1" local command="$2" @@ -43,37 +41,17 @@ error_handler() { echo -e "\n$error_message\n" } -# This function displays a spinner. -spinner() { - tput civis - spinner="/-\\|/-\\|" - spin_i=0 - while true; do - printf "\b%s" "${spinner:spin_i++%${#spinner}:1}" - sleep 0.1 - done -} - -# This function displays an informational message with a yellow color. msg_info() { local msg="$1" - echo -ne " ${HOLD} ${YW}${msg} " - spinner & - SPINNER_PID=$! + echo -ne " ${HOLD} ${YW}${msg}..." } -# This function displays a success message with a green color. msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - tput cnorm local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } -# This function displays a error message with a red color. msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi - tput cnorm local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" }