build_depends() { local container=$1
local should_wait=$2
for dep in $(cat $container/*-depends 2> /dev/null) do
build_depends $CONTAINER_PATH/$dep block_wait
donebuild_depends $CONTAINER_PATH/$dep
To enable concurrency in independent containers, it can be:
for dep in $(cat $container/*-depends 2> /dev/null) do build_depends $CONTAINER_PATH/$dep & done
wait
Good point !!
-------- Thanks Yu Chuan
Thnaks, Xijian