diff options
-rw-r--r-- | spinner.sh | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4,13 +4,13 @@ # string to display as second argument (default provided) and spins # until the process completes. spinner() { - local PROC="$1" + local proc="$1" #local str="${2:-'Copyright of KatworX© Tech. Developed by Arjun Singh Kathait and Debugged by the ☆Stack Overflow Community☆'}" local str="" local delay="0.1" tput civis # hide cursor printf "%b" "${WHT}" - while [ -d /proc/"$PROC" ]; do + while [ -d /proc/"$proc" ]; do #-\|/ #⠁⠂⠄⡀⢀⠠⠐⠈ #▁▂▃▄▅▆▇█▇▆▅▄▃▂▁ @@ -38,7 +38,7 @@ spinner() { printf '\033[s\033[u[ ▂ ] %s\033[u' "$str"; sleep "$delay" printf '\033[s\033[u[ ▁ ] %s\033[u' "$str"; sleep "$delay" done - wait "${PROC}" + wait "${proc}" retval=$? printf '\033[s\033[u%*s\033[u\033[0m' $((${#str}+6)) " " # return to normal tput cnorm # restore cursor |