Commit 576437a5 authored by Guido Gunther's avatar Guido Gunther
Browse files

root.sh: Quote more variables

parent f9e60b5b
......@@ -58,7 +58,7 @@ function setup_kernel()
mkdir -p "${basedir}/boot/dtbs"
case "${pureos_board}" in
imx6)
fdt_source="${basedir}"/usr/lib/linux-image-*/"${fdt_file}"
fdt_source="${basedir}/usr/lib/linux-image-*/${fdt_file}"
link=$(basename "${basedir}"/boot/vmlinuz-*)
rm -f "${basedir}/boot/zImage"
ln -s "${link}" "${basedir}/boot/zImage"
......@@ -66,16 +66,16 @@ function setup_kernel()
cp "${basedir}/boot/zImage" "tmp/"
;;
ec-som|imx8)
fdt_source="${basedir}"/usr/lib/linux-image-*/freescale/"${fdt_file}"
fdt_source="${basedir}/usr/lib/linux-image-*/freescale/${fdt_file}"
cp "${basedir}/boot/${link}" "${basedir}/boot/Image.gz"
gunzip "${basedir}/boot/Image.gz"
;;
devkit*)
# Reconfigure kernel package to trigger kernel hooks
chroot "${basedir}" dpkg-reconfigure $(basename ${kernel_deb%%_*})
chroot "${basedir}" dpkg-reconfigure "$(basename "${kernel_deb%%_*}")"
;;
esac
[ -z "${fdt_source}" ] || cp ${fdt_source} "${basedir}/boot/dtbs/"
[ -z "${fdt_source}" ] || cp "${fdt_source}" "${basedir}/boot/dtbs/"
}
......@@ -122,8 +122,8 @@ function check_patched()
for pkg in ${patched}; do
# Not all architectures have all packages, so check this first
if chroot "${basedir}" dpkg -s ${pkg}; then
if ! chroot "${basedir}" dpkg -s ${pkg} | grep -qs "^Version: .*pureos"; then
if chroot "${basedir}" dpkg -s "${pkg}"; then
if ! chroot "${basedir}" dpkg -s "${pkg}" | grep -qs "^Version: .*pureos"; then
echo "${pkg} is not a patched version."
exit 1
fi
......@@ -242,7 +242,7 @@ EOF
cat << EOF > "${basedir}/etc/apt/sources.list.d/ci.list"
deb http://ci.puri.sm/ scratch librem5
EOF
cat data/ci-repo.key | chroot ${basedir} apt-key add -
cat data/ci-repo.key | chroot "${basedir}" apt-key add -
fi
}
......
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