Three modes the installer now branches on:
iso-chroot Running inside the new system's chroot from the ISO build.
pacman is configured by archinstall; systemd isn't running,
so service enables skip --now.
online-package Running on an existing Arch where the omarchy-* packages
are already installed. Skip base.sh and the bootstrap
preflight steps; only the per-host runtime ops in
config/login/post-install need to run.
online-git boot.sh path: clone into $HOME/.local/share/omarchy and
bootstrap everything from scratch.
install.sh derives OMARCHY_PATH from its own location, so the same script
works whether it's at /usr/share/omarchy/install.sh (package mode) or
$HOME/.local/share/omarchy/install.sh (git mode). install_mode_is helper
replaces direct ${OMARCHY_CHROOT_INSTALL:-} / ${OMARCHY_ONLINE_INSTALL:-}
checks in chroot.sh, finished.sh, errors.sh, mise-work.sh, preflight/pacman.sh.
Legacy vars still work through export_legacy_mode_flags, which sets
OMARCHY_CHROOT_INSTALL=1 / OMARCHY_ONLINE_INSTALL=true based on the
canonical mode for any caller that hasn't been updated.
bin/omarchy-install-mode prints the current mode for scripts/users that
need to introspect.
Smoke-tested all four entry paths (explicit mode, both legacy shims,
auto-detection from OMARCHY_PATH); each resolves correctly and the
legacy flags are exported in matching modes.
39 lines
1.1 KiB
Bash
39 lines
1.1 KiB
Bash
stop_install_log
|
|
|
|
echo_in_style() {
|
|
echo "$1" | tte --canvas-width 0 --anchor-text c --frame-rate 640 print
|
|
}
|
|
|
|
clear
|
|
echo
|
|
tte -i $OMARCHY_PATH/logo.txt --canvas-width 0 --anchor-text c --frame-rate 920 laseretch
|
|
echo
|
|
|
|
# Display installation time if available
|
|
if [[ -f $OMARCHY_INSTALL_LOG_FILE ]] && grep -q "Total:" "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null; then
|
|
echo
|
|
TOTAL_TIME=$(tail -n 20 "$OMARCHY_INSTALL_LOG_FILE" | grep "^Total:" | sed 's/^Total:[[:space:]]*//')
|
|
if [[ -n $TOTAL_TIME ]]; then
|
|
echo_in_style "Installed in $TOTAL_TIME"
|
|
fi
|
|
else
|
|
echo_in_style "Finished installing"
|
|
fi
|
|
|
|
if sudo test -f /etc/sudoers.d/99-omarchy-installer; then
|
|
sudo rm -f /etc/sudoers.d/99-omarchy-installer &>/dev/null
|
|
fi
|
|
|
|
# Exit gracefully if user chooses not to reboot
|
|
if gum confirm --padding "0 0 0 $((PADDING_LEFT + 32))" --show-help=false --default --affirmative "Reboot Now" --negative "" ""; then
|
|
# Clear screen to hide any shutdown messages
|
|
clear
|
|
|
|
if install_mode_is iso-chroot; then
|
|
touch /var/tmp/omarchy-install-completed
|
|
exit 0
|
|
else
|
|
sudo reboot 2>/dev/null
|
|
fi
|
|
fi
|