From 7653e538cf9a1c71bc992aa7166984c5cddf0931 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Wed, 20 Dec 2017 06:16:14 +0000 Subject: [PATCH] distro-tool: avoid sourcing non-existing packages --- tools/distro-tool | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tools/distro-tool b/tools/distro-tool index c098748ba1..d93ab47605 100755 --- a/tools/distro-tool +++ b/tools/distro-tool @@ -726,7 +726,7 @@ get_libreelec_branch() { get_libreelec_option() { local variable="$1" cd $LIBREELEC_DIR - . config/options + source config/options "" echo "${!variable}" } @@ -759,13 +759,18 @@ generate_work() { # Generate workload using multiple threads init_progress - tcount=0 - while [ : ]; do - tcount=$((tcount + 1)) - [ ${tcount} -gt ${WORKER_MAX} ] && break - generate_work_worker ${pcount} ${tcount} ${revision} & - done - wait + ( + cd $LIBREELEC_DIR + source config/options "" + + tcount=0 + while [ : ]; do + tcount=$((tcount + 1)) + [ ${tcount} -gt ${WORKER_MAX} ] && break + generate_work_worker ${pcount} ${tcount} ${revision} & + done + wait + ) end_progress