From 2f58ceebf66daaf8b302a84b5fd1924d7b54e874 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 11 Jun 2017 20:57:12 +0100 Subject: [PATCH] Try calling function for source --- src/freedombone-controlpanel | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index f370f38a..8c5ea68e 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -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=