Restore the env + redirect setup that the previously-working ISO
installer used (matching /home/ryan/Downloads/ISO scripts/.automated_script.sh):
export COLUMNS=$(tput cols)
export LINES=$(tput lines)
exec > >(tee >(sed CSI-strip >> log) 2>/dev/null) 2>/dev/tty
export CLICOLOR_FORCE=1
export FORCE_COLOR=1
The cutover commit (064b5e2) silently dropped these. Subsequent
attempts to fix the TTY/gum rendering by reshaping the redirect were
all symptom-chasing — the proven shape was correct. The key insight:
- gum draws its TUI on stderr, not stdout. 2>/dev/tty keeps that
rendering on the real terminal.
- stdout-as-pipe (via tee) is *desired*: it lets gum detect a
non-TTY stdout and skip cursor-position probes (CSI 6n). Without
that detection, the DSR replies leak as visible ^[[13;1R bytes.
- CLICOLOR_FORCE/FORCE_COLOR force gum to still emit colour despite
stdout being a pipe.
Also drops the configurator's _drain_tty workaround — unnecessary
once gum stops sending DSR queries in the first place.
54 lines
2.0 KiB
Bash
54 lines
2.0 KiB
Bash
#!/usr/bin/env bash
|
|
#
|
|
# Live ISO entry point on tty1: set up the live VT, run the configurator
|
|
# wizard, then hand off to the Python install orchestrator. Mirrors the
|
|
# stream/env contract from the previously-working installer:
|
|
# - stdout teed to /var/log/omarchy-install.log (CSI-stripped) AND to tty
|
|
# - stderr direct to /dev/tty so gum (which draws its TUI on stderr)
|
|
# renders correctly
|
|
# - CLICOLOR_FORCE/FORCE_COLOR so gum emits ANSI even with stdout piped
|
|
# - COLUMNS/LINES so gum picks up real terminal size
|
|
set -euo pipefail
|
|
|
|
[[ $(tty) == /dev/tty1 ]] || exit 0
|
|
|
|
export OMARCHY_MIRROR="$(cat /root/omarchy_mirror)"
|
|
export OMARCHY_PATH=/usr/share/omarchy
|
|
export OMARCHY_INSTALL=$OMARCHY_PATH/install
|
|
export OMARCHY_INSTALL_LOG_FILE=/var/log/omarchy-install.log
|
|
source "$OMARCHY_INSTALL/helpers/all.sh"
|
|
|
|
# Tokyo Night palette so the live VT matches the installed look.
|
|
set_tokyo_night_colors() {
|
|
echo -en "\e]P01a1b26"; echo -en "\e]P1f7768e"; echo -en "\e]P29ece6a"
|
|
echo -en "\e]P3e0af68"; echo -en "\e]P47aa2f7"; echo -en "\e]P5bb9af7"
|
|
echo -en "\e]P67dcfff"; echo -en "\e]P7a9b1d6"; echo -en "\e]P8414868"
|
|
echo -en "\e]P9f7768e"; echo -en "\e]PA9ece6a"; echo -en "\e]PBe0af68"
|
|
echo -en "\e]PC7aa2f7"; echo -en "\e]PDbb9af7"; echo -en "\e]PE7dcfff"
|
|
echo -en "\e]PFc0caf5"
|
|
echo -en "\033[0m"
|
|
clear
|
|
}
|
|
set_tokyo_night_colors
|
|
|
|
mkdir -p /var/log
|
|
touch "$OMARCHY_INSTALL_LOG_FILE"
|
|
|
|
export COLUMNS=$(tput cols)
|
|
export LINES=$(tput lines)
|
|
exec > >(tee >(sed -u 's/\x1b\[[0-9;]*[a-zA-Z]//g' >>"$OMARCHY_INSTALL_LOG_FILE") 2>/dev/null) 2>/dev/tty
|
|
export CLICOLOR_FORCE=1
|
|
export FORCE_COLOR=1
|
|
|
|
cd /root
|
|
./configurator
|
|
|
|
# Absolute paths because omarchy-iso-install cd's into /usr/share/omarchy-iso
|
|
# before exec'ing python; relative paths would resolve against the wrong dir.
|
|
exec /usr/local/bin/omarchy-iso-install \
|
|
--config /root/user_configuration.json \
|
|
--creds /root/user_credentials.json \
|
|
--full-name-file /root/user_full_name.txt \
|
|
--email-file /root/user_email_address.txt \
|
|
--encrypt-file /root/user_encrypt_installation.txt
|