Wait bar
This commit is contained in:
parent
3b1cc15f4e
commit
617e8f940d
|
@ -47,19 +47,39 @@ function please_wait {
|
|||
echo -n ''
|
||||
}
|
||||
|
||||
please_wait
|
||||
#please_wait
|
||||
|
||||
max_files=0
|
||||
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
|
||||
for f in $UTILS_FILES
|
||||
do
|
||||
max_files=$((max_files + 1))
|
||||
done
|
||||
APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
|
||||
for f in $APP_FILES
|
||||
do
|
||||
max_files=$((max_files + 1))
|
||||
done
|
||||
|
||||
|
||||
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
|
||||
file_ctr=0
|
||||
echo "0" | dialog --gauge $"Please wait" 7 70 0
|
||||
for f in $UTILS_FILES
|
||||
do
|
||||
echo "$((file_ctr * 100 / max_files))" | dialog --gauge $"Please wait" 7 70 0
|
||||
source $f
|
||||
file_ctr=$((file_ctr + 1))
|
||||
done
|
||||
|
||||
APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
|
||||
for f in $APP_FILES
|
||||
do
|
||||
echo "$((file_ctr * 100 / max_files))" | dialog --gauge $"Please wait" 7 70 0
|
||||
source $f
|
||||
file_ctr=$((file_ctr + 1))
|
||||
done
|
||||
echo "100" | dialog --gauge $"Please wait" 7 70 0
|
||||
|
||||
COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
|
||||
SELECTED_USERNAME=
|
||||
|
|
Loading…
Reference in New Issue