Spinner position
This commit is contained in:
parent
c1f9920cb3
commit
376903c260
|
@ -53,11 +53,15 @@ function include_source {
|
|||
|
||||
please_wait
|
||||
|
||||
width=$(tput cols)
|
||||
height=$(tput lines)
|
||||
spin='-\|/'
|
||||
i=0
|
||||
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
|
||||
for f in $UTILS_FILES
|
||||
do
|
||||
tput cup $((height * 3 / 5)) $(((width / 2)))
|
||||
echo -n ''
|
||||
i=$(( (i+1) %4 ))
|
||||
printf "\r${spin:$i:1}"
|
||||
source $f
|
||||
|
@ -66,6 +70,8 @@ done
|
|||
APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
|
||||
for f in $APP_FILES
|
||||
do
|
||||
tput cup $((height * 3 / 5)) $(((width / 2)))
|
||||
echo -n ''
|
||||
i=$(( (i+1) %4 ))
|
||||
printf "\r${spin:$i:1}"
|
||||
source $f
|
||||
|
|
Loading…
Reference in New Issue