mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 13:06:59 +02:00
sysext: allow for architecture-specific sysexts
This commit is contained in:
parent
894c794aeb
commit
9cb0d0c8e5
@ -213,20 +213,30 @@ create_prod_sysexts() {
|
|||||||
local image_name="$1"
|
local image_name="$1"
|
||||||
local image_sysext_base="${image_name%.bin}_sysext.squashfs"
|
local image_sysext_base="${image_name%.bin}_sysext.squashfs"
|
||||||
for sysext in "${EXTRA_SYSEXTS[@]}"; do
|
for sysext in "${EXTRA_SYSEXTS[@]}"; do
|
||||||
local name="flatcar-${sysext%%|*}"
|
local name pkgs useflags arches
|
||||||
local pkgs_and_useflags="${sysext#*|}"
|
IFS="|" read -r name pkgs useflags arches <<< "$sysext"
|
||||||
local pkgs="${pkgs_and_useflags%%|*}"
|
name="flatcar-$name"
|
||||||
local pkg_array=(${pkgs//,/ })
|
local pkg_array=(${pkgs//,/ })
|
||||||
local useflags=""
|
local arch_array=(${arches//,/ })
|
||||||
if [[ "$pkgs_and_useflags" == *\|* ]]; then
|
|
||||||
useflags="${pkgs_and_useflags#*|}"
|
|
||||||
fi
|
|
||||||
local useflags_array=(${useflags//,/ })
|
local useflags_array=(${useflags//,/ })
|
||||||
|
|
||||||
local mangle_script="${BUILD_LIBRARY_DIR}/sysext_mangle_${name}"
|
local mangle_script="${BUILD_LIBRARY_DIR}/sysext_mangle_${name}"
|
||||||
if [[ ! -x "${mangle_script}" ]]; then
|
if [[ ! -x "${mangle_script}" ]]; then
|
||||||
mangle_script=
|
mangle_script=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n "$arches" ]]; then
|
||||||
|
should_skip=1
|
||||||
|
for arch in "${arch_array[@]}"; do
|
||||||
|
if [[ $arch == "$ARCH" ]]; then
|
||||||
|
should_skip=0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ $should_skip -eq 1 ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
sudo rm -f "${BUILD_DIR}/${name}.raw" \
|
sudo rm -f "${BUILD_DIR}/${name}.raw" \
|
||||||
"${BUILD_DIR}/flatcar-test-update-${name}.gz" \
|
"${BUILD_DIR}/flatcar-test-update-${name}.gz" \
|
||||||
"${BUILD_DIR}/${name}_*"
|
"${BUILD_DIR}/${name}_*"
|
||||||
|
Loading…
Reference in New Issue
Block a user