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