79ea63f525
GRUB_OPTS has never been documented as externally available, and is not used. Assume it's value to simplify the code. Move the grub version check separately, as we only support grub2 Remove references to buliding i386 images. I don't image it works in any way. Remove ci.md, which is no longer relevant. Refactor the test for "building BIOS image on EFI system" consiberably after these changes. Change-Id: Ia99687815667c3cf5e82cf21d841d3b1008b8fa9
45 lines
943 B
Bash
Executable File
45 lines
943 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
if [[ "amd64 x86_64" =~ "$ARCH" ]]; then
|
|
basearch=x86_64
|
|
arch=x86_64
|
|
elif [[ "$ARCH" = "ppc64" ]]; then
|
|
basearch=ppc64
|
|
arch=ppc64
|
|
elif [[ "$ARCH" = "ppc64le" ]]; then
|
|
basearch=ppc64le
|
|
arch=ppc64le
|
|
elif [[ "arm64 aarch64" =~ "$ARCH" ]]; then
|
|
basearch=aarch64
|
|
arch=aarch64
|
|
else
|
|
echo "********************"
|
|
echo "Unknown arch '$ARCH'"
|
|
echo "********************"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ${YUM} == "dnf" ]]; then
|
|
mkdir -p /etc/dnf/vars
|
|
echo $basearch > /etc/dnf/vars/basearch
|
|
echo $arch > /etc/dnf/vars/arch
|
|
else
|
|
echo $basearch > /etc/yum/vars/basearch
|
|
echo $arch > /etc/yum/vars/arch
|
|
fi
|
|
|
|
if [[ ${DISTRO_NAME} =~ "centos" ]]; then
|
|
if [[ ${arch} == "x86_64" ]]; then
|
|
contentdir=centos
|
|
else
|
|
contentdir=altarch
|
|
fi
|
|
echo $contentdir > /etc/${YUM}/vars/contentdir
|
|
fi
|