Commit 5f1efed9 authored by Guido Gunther's avatar Guido Gunther
Browse files

Whitespace cleanups

The mixture of space and tab was annoying, use space everywhere
parent 92443036
......@@ -21,7 +21,7 @@ usage() {
build_auth () {
if [ -f conf/auth.conf ]; then
# shellcheck disable=SC1091
# shellcheck disable=SC1091
. ./conf/auth.conf
JENKINS_AUTH=(--auth-no-challenge "--http-user=${JENKINS_USER}" "--http-password=${JENKINS_TOKEN}")
fi
......@@ -29,16 +29,16 @@ build_auth () {
fetch_nitrogen_uboot_upgrade() {
local board="$1"
local url="$2"
local out="$3"
dest="${out}/uboot-${board}"
local board="$1"
local url="$2"
local out="$3"
dest="${out}/uboot-${board}"
[ ! -d "${dest}" ] || return 0
[ ! -d "${dest}" ] || return 0
echo -n "Fetching uboot upgrade..."
wget -q -Ascr -Aupgrade -A"*nitrogen*" -P"${dest}" -nd -l 1 --mirror "${url}/uboot-${board}/"
echo "done."
echo -n "Fetching uboot upgrade..."
wget -q -Ascr -Aupgrade -A"*nitrogen*" -P"${dest}" -nd -l 1 --mirror "${url}/uboot-${board}/"
echo "done."
}
......@@ -180,18 +180,18 @@ rm -f "./tmp/${pureos_board}-report.log"
echo > "${meta_yml}"
if [ -n "${kernel_url}" ]; then
fetch_kernel
fetch_uboot "${uboot_type}"
for deb in files/linux-image-*-*_arm64.deb; do
! [[ "${deb}" =~ dbg ]] || continue
if [ -n "${kernel_deb}" ]; then
echo "Found more than one possible kernel deb in files/"
exit 1
fi
kernel_deb="$deb"
done
[ -n "${kernel_deb}" ] || { echo "No kernel found."; exit 1; }
custom_package_opt=(--custom-package "${kernel_deb}")
fetch_kernel
fetch_uboot "${uboot_type}"
for deb in files/linux-image-*-*_arm64.deb; do
! [[ "${deb}" =~ dbg ]] || continue
if [ -n "${kernel_deb}" ]; then
echo "Found more than one possible kernel deb in files/"
exit 1
fi
kernel_deb="$deb"
done
[ -n "${kernel_deb}" ] || { echo "No kernel found."; exit 1; }
custom_package_opt=(--custom-package "${kernel_deb}")
fi
echo "Using kernel ${kernel_deb}"
......
......@@ -21,7 +21,7 @@
: "${qemu:-}"
: "${uboot_type:-}"
# distro and basedir set by calling script
# distro and basedir set by calling script
basedir="$1"
image_name="$2"
target_qemu="${basedir}/${qemu}"
......@@ -29,8 +29,8 @@ stamp="${basedir}/var/log/gitrev.log"
for env_var in distro pureos_board packages; do
if [ -z "${!env_var}" ]; then
echo "Must pass in \$${env_var} via the environment" 1>&2
exit 1
echo "Must pass in \$${env_var} via the environment" 1>&2
exit 1
fi
done
......@@ -130,8 +130,8 @@ function check_patched()
fi
for pkg in ${patched}; do
# Not all architectures have all packages, so check this first
if chroot "${basedir}" dpkg -s "${pkg}" > /dev/null 2>&1; then
# Not all architectures have all packages, so check this first
if chroot "${basedir}" dpkg -s "${pkg}" > /dev/null 2>&1; then
if ! chroot "${basedir}" dpkg -s "${pkg}" | grep -qs "^Version: .*pureos"; then
echo "${pkg} is not a patched version."
exit 1
......@@ -227,9 +227,9 @@ function install_pkgs()
# Need to split package list
# shellcheck disable=SC2086
if ! chroot "${basedir}" apt -y install ${packages}; then
echo "Package installation failed, this might help to diagnose the problem:"
# shellcheck disable=SC2086
chroot "${basedir}" apt -y -o Debug::pkgProblemResolver=yes install -y --simulate ${packages}
echo "Package installation failed, this might help to diagnose the problem:"
# shellcheck disable=SC2086
chroot "${basedir}" apt -y -o Debug::pkgProblemResolver=yes install -y --simulate ${packages}
fi
}
......@@ -242,8 +242,8 @@ function setup_apt()
cat "${basedir}/etc/apt/sources.list"
cat << EOF > "${basedir}/etc/apt/apt.conf.d/71-no-recommends"
APT::Install-Recommends "0";
APT::Install-Suggests "0";
APT::Install-Recommends "0";
APT::Install-Suggests "0";
EOF
chroot "${basedir}" apt-get install -y gnupg
......@@ -287,12 +287,12 @@ EOF
function create_report()
{
echo "Installed packages:"
chroot "${basedir}" dpkg -l
echo -e "\\nInstalled apt keys:"
chroot "${basedir}" apt-key list
echo -e "\\nKernels:"
ls -l "${basedir}/boot"
echo "Installed packages:"
chroot "${basedir}" dpkg -l
echo -e "\\nInstalled apt keys:"
chroot "${basedir}" apt-key list
echo -e "\\nKernels:"
ls -l "${basedir}/boot"
}
......
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