Sync from SUSE:SLFO:Main elemental-post-build-extract-iso revision dfa7314a7bcef4cbf91dd6fa0a984556
This commit is contained in:
parent
73db0e3921
commit
2dc7d06b9c
@ -1,8 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 18 13:30:28 UTC 2024 - David Cassany <dcassany@suse.com>
|
||||
|
||||
- Extend the extraction script to also support disk images
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 2 09:42:17 UTC 2024 - Klaus Kämpf <kkaempf@suse.com>
|
||||
|
||||
- install to /usr/lib/build/post_build.d
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 2 09:42:17 UTC 2024 - Klaus Kämpf <kkaempf@suse.com>
|
||||
|
||||
- install to /usr/lib/build/post_build.d
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 26 15:56:20 UTC 2023 - David Cassany <dcassany@suse.com>
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user