mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 17:36:18 -05:00
53 lines
1.5 KiB
Bash
Executable file
53 lines
1.5 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
BUILD_DIR=/tmp/wrolpi-build
|
|
|
|
VERSION=$(cat "${SCRIPT_DIR}/../wrolpi/version.txt")
|
|
|
|
# Re-execute this script if it wasn't called with sudo.
|
|
if [ $EUID != 0 ]; then
|
|
sudo "$0" "$@"
|
|
exit $?
|
|
fi
|
|
|
|
[ -f "${SCRIPT_DIR}/config/includes.chroot/opt/wrolpi-blobs/gis-map.dump.gz" ] || \
|
|
(echo "config/includes.chroot/opt/wrolpi-blobs/gis-map.dump.gz does not exist!" && exit 1)
|
|
|
|
# Clear out old builds.
|
|
[ -d "${BUILD_DIR}" ] && rm -rf "${BUILD_DIR}"
|
|
mkdir "${BUILD_DIR}"
|
|
cd "${BUILD_DIR}" || (echo "Work directory must exist" && exit 1)
|
|
set -e
|
|
|
|
lb config \
|
|
--binary-images iso-hybrid \
|
|
--mode debian \
|
|
--architectures amd64 \
|
|
--linux-flavours amd64 \
|
|
--distribution bookworm \
|
|
--debian-installer live \
|
|
--debian-installer-gui true \
|
|
--archive-areas "main contrib non-free non-free-firmware" \
|
|
--updates true \
|
|
--security true \
|
|
--apt-recommends false \
|
|
--firmware-binary true \
|
|
--firmware-chroot true \
|
|
--win32-loader false \
|
|
--checksums sha512 \
|
|
--clean \
|
|
--color \
|
|
--linux-packages "linux-image linux-headers" \
|
|
--memtest memtest86+ \
|
|
--iso-volume "WROLPi v${VERSION}" \
|
|
--iso-application "WROLPi v${VERSION}" \
|
|
--iso-preparer WROLPi \
|
|
--iso-publisher https://wrolpi.org
|
|
|
|
rsync -a "${SCRIPT_DIR}/config" "${BUILD_DIR}/"
|
|
|
|
lb build 2>&1 | tee "${SCRIPT_DIR}/build.log"
|
|
|
|
cp "${BUILD_DIR}"/*iso "${SCRIPT_DIR}/" || (echo "Build failed. No ISOs were found!" && exit 1)
|
|
chmod 644 "${SCRIPT_DIR}"/*iso
|