1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

use array

This commit is contained in:
Jason N. 2024-03-04 21:04:42 -05:00
parent 994272abc1
commit c7a37c5eff

View file

@ -5,23 +5,23 @@ set -ex
# Create /dev/loop0 if it doesn't already exist. `losetup` has an issue creating it during the first run # Create /dev/loop0 if it doesn't already exist. `losetup` has an issue creating it during the first run
mknod -m 0660 /dev/loop0 b 7 0 2>/dev/null || true mknod -m 0660 /dev/loop0 b 7 0 2>/dev/null || true
args="" args=()
for i for i
do do
key=$(echo ${i} | cut -d= -f1) key=$(echo ${i} | cut -d= -f1)
value=$(echo ${i} | cut -d= -f2-) value=$(echo ${i} | cut -d= -f2-)
export ${key}="${value}" export ${key}="${value}"
args="${args} ${key}=\"${value}\"" args+=("${key}=\"${value}\"")
done done
# Pull container # Pull container
make container/${IMAGE_NAME}-${IMAGE_TAG} $args make container/${IMAGE_NAME}-${IMAGE_TAG} $args[@]
# Build base ISO # Build base ISO
make boot.iso $args make boot.iso $args[@]
# Add container to ISO # Add container to ISO
make build/deploy.iso $args make build/deploy.iso $args[@]
# Make output dir in github workspace # Make output dir in github workspace
mkdir /github/workspace/build || true mkdir /github/workspace/build || true