Try calling function for source

This commit is contained in:
Bob Mottram 2017-06-11 20:57:12 +01:00
parent 0d1fa4e13e
commit 2f58ceebf6
1 changed files with 6 additions and 2 deletions

View File

@ -47,6 +47,10 @@ function please_wait {
echo -n ''
}
function include_source {
source $1
}
#please_wait
utils_files=0
@ -65,11 +69,11 @@ 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))"; 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 / utils_files))"; include_source $f; file_ctr=$((file_ctr + 1)); done | dialog --gauge $"Loading utilities" 7 70 0
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))"; source $f; file_ctr=$((file_ctr + 1)); done | dialog --gauge $"Loading apps" 7 70 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
COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
SELECTED_USERNAME=