redox/scripts/ventoy.sh

36 lines
652 B
Bash
Raw Permalink Normal View History

2023-05-11 04:25:07 +02:00
#!/usr/bin/env bash
2024-08-15 16:54:51 +02:00
# This script create and copy the Redox bootable image to an Ventoy-formatted device
2023-05-11 04:25:07 +02:00
set -e
ARCHS=(
i686
x86_64
)
CONFIGS=(
demo
2023-05-11 04:25:07 +02:00
desktop
)
VENTOY="/media/${USER}/Ventoy"
if [ ! -d "${VENTOY}" ]
then
echo "Ventoy not mounted" >&2
exit 1
fi
for ARCH in "${ARCHS[@]}"
do
for CONFIG_NAME in "${CONFIGS[@]}"
do
IMAGE="build/${ARCH}/${CONFIG_NAME}/livedisk.iso"
make ARCH="${ARCH}" CONFIG_NAME="${CONFIG_NAME}" "${IMAGE}"
cp -v "${IMAGE}" "${VENTOY}/redox-${CONFIG_NAME}-${ARCH}.iso"
done
done
sync
2023-05-11 04:25:07 +02:00
echo "Finished copying configs (${CONFIGS[@]}) for archs (${ARCHS[@]})"