Different way of doing progress bars

This commit is contained in:
Bob Mottram 2017-06-11 22:10:12 +01:00
parent 2f58ceebf6
commit fccc78c627
1 changed files with 20 additions and 2 deletions

View File

@ -69,11 +69,29 @@ done
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
file_ctr=0
for f in $UTILS_FILES; do echo "$((file_ctr * 100 / utils_files))"; include_source $f; file_ctr=$((file_ctr + 1)); done | dialog --gauge $"Loading utilities" 7 70 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
for f in $APP_FILES; do echo "$((file_ctr * 100 / apps_files))"; include_source $f; file_ctr=$((file_ctr + 1)); done | dialog --gauge $"Loading apps" 7 70 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=