Files
bananarchy/prepare-release.sh
T
Luxferre 2198ba16b3 Shorten Power menu bootloader label to fit screen
Change Reboot to bootloader to Reboot to loader in dmenu.so, appmenu and context menu. Rebuild the ARM dmenu plugin, sync prebuilt/overlay artifacts, strengthen check-rebuild guards, and synchronize docs. Deployed to the live phone and restarted the resident dmenu plugin.
2026-11-10 18:01:01 +02:00

51 lines
1.6 KiB
Bash
Executable File

#!/bin/sh
# Release archive builder for Bananarchy
set -eu
BA_TARGET="${1:-nokia-argon}"
BA_REBUILD="${BA_REBUILD:-0}"
BA_VER="$(./scripts/version.sh --print)"
BA_CODENAME="$(./scripts/version.sh --print-codename)"
RELDIR="bananarchy-${BA_TARGET}-${BA_VER}-${BA_CODENAME}"
DISPLAY_IMAGE="images/boot-lk2nd-nokia-beatles-display.img"
display_lk2nd_is_current() {
python3 scripts/check-lk2nd-beatles.py \
--image "$DISPLAY_IMAGE" \
--patch bootloader/lk2nd/nokia-beatles.patch \
--expect-fastboot 0 --expect-display 1 >/dev/null 2>&1
}
NEED_REBUILD=0
if [ ! -f "images/bananarchy-${BA_TARGET}.img" ]; then
NEED_REBUILD=1
fi
if [ "$BA_TARGET" = "nokia-beatles" ]; then
for f in images/boot-bananarchy-nokia-beatles.img "$DISPLAY_IMAGE"; do
[ -f "$f" ] || NEED_REBUILD=1
done
fi
if [ "$BA_REBUILD" = "1" ] || [ "$NEED_REBUILD" = "1" ]; then
./rebuild-image.sh "$BA_TARGET" --mkinitfs
fi
# The default 2720 lk2nd image must contain the low-bit reboot cookie, or
# "Reboot to loader" cannot return to the visible Fastboot menu.
if [ "$BA_TARGET" = "nokia-beatles" ] && \
{ [ "$BA_REBUILD" = "1" ] || ! display_lk2nd_is_current; }; then
./scripts/build-lk2nd-beatles.sh
fi
mkdir -p "$RELDIR"
cp "images/bananarchy-${BA_TARGET}.img" "$RELDIR/"
if [ "$BA_TARGET" = "nokia-beatles" ]; then
cp images/boot-bananarchy-nokia-beatles.img "$RELDIR/"
cp "$DISPLAY_IMAGE" "$RELDIR/"
else
cp bootloader/lk2nd-msm8909.img "$RELDIR/"
fi
zip -9r "${RELDIR}.zip" "$RELDIR"
rm -rf "$RELDIR"
echo "Release $BA_VER ($BA_CODENAME) for $BA_TARGET packed into ${RELDIR}.zip"