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