mirror of
				https://github.com/tteck/Proxmox.git
				synced 2025-10-31 10:59:24 +00:00 
			
		
		
		
	Update alpine-install.func
add spinner, attempt 3
This commit is contained in:
		
							parent
							
								
									c73a2909f7
								
							
						
					
					
						commit
						df25fe9446
					
				| @ -35,7 +35,7 @@ catch_errors() { | ||||
| 
 | ||||
| error_handler() { | ||||
|   if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi | ||||
|   printf "\033[?25h" | ||||
|   tput cnorm | ||||
|   local exit_code="$?" | ||||
|   local line_number="$1" | ||||
|   local command="$2" | ||||
| @ -45,7 +45,7 @@ error_handler() { | ||||
| 
 | ||||
| # This function displays a spinner. | ||||
| spinner() { | ||||
|   printf "\033[?25l" | ||||
|   tput civis | ||||
|   spinner="/-\\|/-\\|" | ||||
|   spin_i=0 | ||||
|   while true; do | ||||
| @ -65,7 +65,7 @@ msg_info() { | ||||
| # 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 | ||||
|   printf "\033[?25h" | ||||
|   tput cnorm | ||||
|   local msg="$1" | ||||
|   echo -e "${BFR} ${CM} ${GN}${msg}${CL}" | ||||
| } | ||||
| @ -73,7 +73,7 @@ msg_ok() { | ||||
| # 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 | ||||
|   printf "\033[?25h" | ||||
|   tput cnorm | ||||
|   local msg="$1" | ||||
|   echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user