Commit e736f53b authored by Guido Gunther's avatar Guido Gunther

build-image: quote variables to avoid word splitting

In case of vmdeboostrap_opts use a shell array to indicate that we want
to expand.
parent b63176b1
......@@ -48,11 +48,11 @@ while getopts ":hb:d:" opt; do
;;
\?)
echo "Invalid Option: -$OPTARG" 1>&2
usage $0
usage "$0"
exit 0
;;
h )
usage $0
usage "$0"
exit 0
;;
esac
......@@ -74,18 +74,17 @@ fi
[ "${board_type}" != "nitrogen6" ] || fetch_nitrogen_uboot_upgrade "${pureos_board}" "${kernel_url}" files/
set -x
sudo pureos_board=${pureos_board} \
distro=${distro} \
sudo pureos_board="${pureos_board}" \
distro="${distro}" \
packages="${packages}" \
http_proxy=${http_apt_proxy:-${http_proxy:-}} \
https_proxy=${https_apt_proxy:-${https_proxy:-}} \
qemu=${qemu} \
arch=${arch} \
http_proxy="${http_apt_proxy:-${http_proxy:-}}" \
https_proxy="${https_apt_proxy:-${https_proxy:-}}" \
qemu="${qemu}" \
arch="${arch}" \
vmdebootstrap \
--enable-dhcp \
--verbose --image $bootimg --log tmp/$bootimg.log --size 3G \
--verbose --image "${bootimg}" --log "tmp/${bootimg}.log" --size 3G \
--no-extlinux \
--mirror "${mirror}" \
--arch=${arch} \
......@@ -94,8 +93,8 @@ sudo pureos_board=${pureos_board} \
--serial-console-command "/sbin/getty -L ttymxc0 115200 vt100" \
--root-password='root' --hostname='pureos' --user=purism/purism --sudo \
--customize "${cwd}/root.sh" \
--owner $(whoami) \
${vmdebootstrap_opts} \
--owner "$(whoami)" \
"${vmdebootstrap_opts[@]}" \
${NULL}
set +x
......
......@@ -15,14 +15,14 @@ case ${pureos_board} in
qemu=/usr/bin/qemu-arm-static
fi
kernel_deb=linux-image-${kernel_version}_${kernel_arch}.deb
vmdebootstrap_opts="--foreign=${qemu}
vmdebootstrap_opts=(--foreign=${qemu}
--bootsize 200M
--boottype ext2
--bootoffset 1M
--custom-package "files/${kernel_deb}"
--no-kernel
--no-update-initramfs
"
)
;;
imx8)
arch=arm64
......@@ -31,10 +31,10 @@ case ${pureos_board} in
board_type=unknown
qemu=/usr/bin/qemu-aarch64-static
kernel_deb=
vmdebootstrap_opts="--foreign=${qemu}
vmdebootstrap_opts=(--foreign="${qemu}"
--use-uefi
--grub
"
)
;;
*)
echo "unrecognized board type ${pureos_board}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment