Address installation inside a chroot

This commit is contained in:
David Heinemeier Hansson
2025-08-19 14:34:34 +02:00
parent 21f60a960b
commit 092b2ba51c
6 changed files with 19 additions and 13 deletions

View File

@@ -7,7 +7,18 @@ export PATH="$HOME/.local/share/omarchy/bin:$PATH"
OMARCHY_INSTALL=~/.local/share/omarchy/install
# Chroot installations have some differences
export OMARCHY_CHROOT_INSTALL=$(! cmp -s /proc/1/root/ / && echo 1 || echo 0)
if ! cmp -s /proc/1/root/ / 2>/dev/null; then
export OMARCHY_CHROOT_INSTALL=1
fi
chrootable_systemctl_enable() {
local args=("$@")
if [ -n "${OMARCHY_CHROOT_INSTALL:-}" ]; then
sudo systemctl "${args[@]}" enable
else
sudo systemctl "${args[@]}" enable --now
fi
}
# Give people a chance to retry running the installation
catch_errors() {