add $SUDO into spinner control.

This commit is contained in:
Promofaux 2016-01-24 21:19:23 +00:00
parent c179936b54
commit eec14be10d

View file

@ -70,12 +70,10 @@ fi
###All credit for the below function goes to http://fitnr.com/showing-a-bash-spinner.html
spinner(){
local pid=$1
local delay=0.001
local spinstr='/-\|'
spin='-\|/'
i=0
while kill -0 $pid 2>/dev/null
while $SUDO kill -0 $pid 2>/dev/null
do
i=$(( (i+1) %4 ))
printf "\b${spin:$i:1}"