build: add support for eng userimages

This commit is contained in:
2026-09-26 16:41:08 +02:00
parent 8de8fe75ab
commit 34043ac550
+11 -3
View File
@@ -14,11 +14,12 @@ rlte_ok() { printf '\033[32m[%s] ok: %s\033[0m\n' "$0" "$*" ; exit 0; }
usage() { usage() {
cat <<EOF cat <<EOF
usage: $0 [-hn] [bootimage|bacon|clean|prune] usage: $0 [-hne] [bootimage|twrp|bacon|clean|prune]
flags: flags:
-h show this help -h show this help
-n don't sync -n don't sync
-e build an engineering image
commands: commands:
bootimage build boot.img (kernel + dt.img + ramdisk, fast gate) bootimage build boot.img (kernel + dt.img + ramdisk, fast gate)
@@ -56,7 +57,13 @@ do_build() {
set +eu set +eu
source build/envsetup.sh source build/envsetup.sh
lunch lineage_rubenslte-userdebug
if [ -v "ENG_IMG" ]; then
lunch lineage_rubenslte-eng
else
lunch lineage_rubenslte-userdebug
fi
set -e set -e
if [ -z "${TARGET_PRODUCT:-}" ]; then if [ -z "${TARGET_PRODUCT:-}" ]; then
@@ -75,10 +82,11 @@ do_build() {
rlte_ok "Done." rlte_ok "Done."
} }
while getopts ":hn" opt; do while getopts ":hne" opt; do
case "$opt" in case "$opt" in
h) usage; exit 0 ;; h) usage; exit 0 ;;
n) NO_SYNC=1 ;; n) NO_SYNC=1 ;;
e) ENG_IMG=1 ;;
*) usage; exit 1 ;; *) usage; exit 1 ;;
esac esac
done done