mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 00:00:13 -08:00
fix: Correct variable declaration order and improve output formatting in show_loading function
This commit is contained in:
@@ -66,8 +66,8 @@ readonly RESET='\033[0m'
|
||||
|
||||
# 🔧 Configuration
|
||||
readonly PLEX_SERVICE="plexmediaserver"
|
||||
readonly SCRIPT_NAME
|
||||
SCRIPT_NAME="$(basename "$0")"
|
||||
readonly SCRIPT_NAME
|
||||
readonly PLEX_WEB_URL="http://localhost:32400/web"
|
||||
|
||||
# 🎭 Unicode symbols for fancy output
|
||||
@@ -110,10 +110,10 @@ show_loading() {
|
||||
echo -ne "${CYAN}${HOURGLASS} ${message}${RESET}"
|
||||
while kill -0 "$pid" 2>/dev/null; do
|
||||
i=$(( (i+1) %4 ))
|
||||
printf "\r${CYAN}${HOURGLASS} ${message} ${spin:$i:1}${RESET}"
|
||||
printf "\r%s%s %s %s%s" "${CYAN}" "${HOURGLASS}" "${message}" "${spin:$i:1}" "${RESET}"
|
||||
sleep 0.1
|
||||
done
|
||||
printf "\r${CYAN}${HOURGLASS} ${message} ${CHECKMARK}${RESET}\n"
|
||||
printf "\r%s%s %s %s%s\n" "${CYAN}" "${HOURGLASS}" "${message}" "${CHECKMARK}" "${RESET}"
|
||||
}
|
||||
|
||||
# 🚀 Enhanced start function
|
||||
|
||||
Reference in New Issue
Block a user