diff --git a/elemental-post-build-extract-iso.changes b/elemental-post-build-extract-iso.changes index 6f777ad..6882580 100644 --- a/elemental-post-build-extract-iso.changes +++ b/elemental-post-build-extract-iso.changes @@ -1,8 +1,18 @@ +------------------------------------------------------------------- +Wed Sep 18 13:30:28 UTC 2024 - David Cassany + +- Extend the extraction script to also support disk images + ------------------------------------------------------------------- Tue Apr 2 09:42:17 UTC 2024 - Klaus Kämpf - install to /usr/lib/build/post_build.d +------------------------------------------------------------------- +Tue Apr 2 09:42:17 UTC 2024 - Klaus Kämpf + +- install to /usr/lib/build/post_build.d + ------------------------------------------------------------------- Fri May 26 15:56:20 UTC 2023 - David Cassany diff --git a/extract-iso.sh b/extract-iso.sh index 8e3d1e0..9cc0a5e 100644 --- a/extract-iso.sh +++ b/extract-iso.sh @@ -15,26 +15,27 @@ set -e img=$(ls ${TOPDIR}/DOCKER/*.tar) || true -# Only consider images with 'iso' as part of the name +# Only consider images with 'iso' or 'disk' as part of the name [ -f "${img}" ] || exit 0 -echo "${img}" | grep -q iso || exit 0 +echo "${img}" | grep -q "iso\|disk" || exit 0 -echo "Extracting ISO from container image" +echo "Extracting image from container" buildah from --name "${container}" "docker-archive:${img}" mnt=$(buildah mount "${container}") -ls "${mnt}" - iso=$(ls "${mnt}"/elemental-iso/*.iso) || true - -[ -f "${iso}" ] || cleanup_and_exit +disk=$(ls "${mnt}"/elemental-disk/*.raw) || true mkdir -p "${TOPDIR}/OTHER" -cp "${iso}" "${TOPDIR}/OTHER" -cp "${iso}.sha256" "${TOPDIR}/OTHER" +if [ -f "${iso}" ]; then + cp "${iso}" "${TOPDIR}/OTHER" + cp "${iso}.sha256" "${TOPDIR}/OTHER" +elif [ -f "${disk}" ]; then + cp "${disk}" "${TOPDIR}/OTHER" +fi cleanup_and_exit