Two progress bars

This commit is contained in:
Bob Mottram 2017-06-11 20:52:53 +01:00
parent 8f17ca8b53
commit 0d1fa4e13e
1 changed files with 7 additions and 7 deletions

View File

@ -49,27 +49,27 @@ function please_wait {
#please_wait #please_wait
max_files=0 utils_files=0
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-* UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
for f in $UTILS_FILES for f in $UTILS_FILES
do do
max_files=$((max_files + 1)) utils_files=$((utils_files + 1))
done done
apps_files=0
APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-* APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
for f in $APP_FILES for f in $APP_FILES
do do
max_files=$((max_files + 1)) apps_files=$((apps_files + 1))
done done
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-* UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
file_ctr=0 file_ctr=0
echo "0" | dialog --gauge $"Please wait" 7 70 0 for f in $UTILS_FILES; do echo "$((file_ctr * 100 / utils_files))"; source $f; file_ctr=$((file_ctr + 1)); done | dialog --gauge $"Loading utilities" 7 70 0
for f in $UTILS_FILES; do echo "$((file_ctr * 100 / max_files))"; source $f; file_ctr=$((file_ctr + 1)); done | dialog --gauge $"Please wait" 7 70 0
APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-* APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
for f in $APP_FILES; do echo "$((file_ctr * 100 / max_files))"; source $f; file_ctr=$((file_ctr + 1)); done | dialog --gauge $"Please wait" 7 70 0 file_ctr=0
echo "100" | dialog --gauge $"Please wait" 7 70 0 for f in $APP_FILES; do echo "$((file_ctr * 100 / apps_files))"; source $f; file_ctr=$((file_ctr + 1)); done | dialog --gauge $"Loading apps" 7 70 0
COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
SELECTED_USERNAME= SELECTED_USERNAME=