Update build_container.sh
This commit is contained in:
@@ -49,8 +49,8 @@ for dir in containers/*/; do
|
|||||||
BUILD_PLATFORM=""
|
BUILD_PLATFORM=""
|
||||||
MULTISTAGE=""
|
MULTISTAGE=""
|
||||||
if [ -f "$PLATFORM_CONF" ]; then
|
if [ -f "$PLATFORM_CONF" ]; then
|
||||||
BUILD_PLATFORM=$(grep -E '^[[:space:]]*platform[[:space:]]*=' "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]')
|
BUILD_PLATFORM=$(grep -E '^[[:space:]]*platform[[:space:]]*=' "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]' || true)
|
||||||
MULTISTAGE=$(grep -E '^[[:space:]]*multistage[[:space:]]*=' "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]')
|
MULTISTAGE=$(grep -E '^[[:space:]]*multistage[[:space:]]*=' "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]' || true)
|
||||||
if [ -n "$BUILD_PLATFORM" ]; then
|
if [ -n "$BUILD_PLATFORM" ]; then
|
||||||
echo "platform.conf trovato in $dir: uso platform=$BUILD_PLATFORM"
|
echo "platform.conf trovato in $dir: uso platform=$BUILD_PLATFORM"
|
||||||
else
|
else
|
||||||
@@ -68,7 +68,7 @@ for dir in containers/*/; do
|
|||||||
for ((target_index = 1; target_index <= BUILD_COUNT; target_index++)); do
|
for ((target_index = 1; target_index <= BUILD_COUNT; target_index++)); do
|
||||||
BUILD_TARGET=""
|
BUILD_TARGET=""
|
||||||
if [ -n "$MULTISTAGE" ]; then
|
if [ -n "$MULTISTAGE" ]; then
|
||||||
BUILD_TARGET=$(grep -E "^[[:space:]]*target${target_index}[[:space:]]*=" "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]')
|
BUILD_TARGET=$(grep -E "^[[:space:]]*target${target_index}[[:space:]]*=" "$PLATFORM_CONF" | tail -n 1 | cut -d '=' -f 2- | tr -d '[:space:]' || true)
|
||||||
if [ -z "$BUILD_TARGET" ]; then
|
if [ -z "$BUILD_TARGET" ]; then
|
||||||
echo "target${target_index} non valorizzato in $PLATFORM_CONF"
|
echo "target${target_index} non valorizzato in $PLATFORM_CONF"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user