Show spinner
This commit is contained in:
parent
fccc78c627
commit
c1f9920cb3
|
@ -51,48 +51,26 @@ function include_source {
|
|||
source $1
|
||||
}
|
||||
|
||||
#please_wait
|
||||
please_wait
|
||||
|
||||
utils_files=0
|
||||
spin='-\|/'
|
||||
i=0
|
||||
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
|
||||
for f in $UTILS_FILES
|
||||
do
|
||||
utils_files=$((utils_files + 1))
|
||||
i=$(( (i+1) %4 ))
|
||||
printf "\r${spin:$i:1}"
|
||||
source $f
|
||||
done
|
||||
apps_files=0
|
||||
|
||||
APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
|
||||
for f in $APP_FILES
|
||||
do
|
||||
apps_files=$((apps_files + 1))
|
||||
i=$(( (i+1) %4 ))
|
||||
printf "\r${spin:$i:1}"
|
||||
source $f
|
||||
done
|
||||
|
||||
|
||||
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
|
||||
file_ctr=0
|
||||
dialog --title "$PROJECT_NAME" --gauge "Loading utils..." 7 75 < <(
|
||||
for f in $UTILS_FILES
|
||||
do
|
||||
echo "$((file_ctr * 100 / utils_files))";
|
||||
cat <<EOF
|
||||
source $f
|
||||
EOF
|
||||
file_ctr=$((file_ctr + 1))
|
||||
done
|
||||
)
|
||||
|
||||
APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
|
||||
file_ctr=0
|
||||
dialog --title "$PROJECT_NAME" --gauge "Loading apps..." 7 75 < <(
|
||||
for f in $APP_FILES
|
||||
do
|
||||
echo "$((file_ctr * 100 / apps_files))";
|
||||
cat <<EOF
|
||||
source $f
|
||||
EOF
|
||||
file_ctr=$((file_ctr + 1))
|
||||
done
|
||||
)
|
||||
|
||||
COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
|
||||
SELECTED_USERNAME=
|
||||
SIP_CONFIGURATION_FILE=/etc/sipwitch.conf
|
||||
|
|
Loading…
Reference in New Issue