From 0128542255fb0cba0d9ea3cdb4e7afc1b92d1b42 Mon Sep 17 00:00:00 2001 From: Ryan Hughes <1630358+ryanrhughes@users.noreply.github.com> Date: Wed, 10 Sep 2025 23:17:11 -0400 Subject: [PATCH] Revert "Eliminate duplicate trap" This reverts commit dd32200181ef6a5688fcb5ed11bec12c060a1c90. --- builder/cmds/autostart.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/builder/cmds/autostart.sh b/builder/cmds/autostart.sh index 59d5654..08a1e52 100644 --- a/builder/cmds/autostart.sh +++ b/builder/cmds/autostart.sh @@ -14,6 +14,39 @@ chroot_bash() { /bin/bash "$@" } +catch_errors() { + echo -e "\n\e[31mOmarchy ISO installation failed!\e[0m" + echo + echo "This command halted with exit code $?:" + echo "$BASH_COMMAND" + echo + echo "Get help from the community via QR code or at https://discord.gg/tXFUdasqhY" + echo " " + echo " █▀▀▀▀▀█ ▄ ▄ ▀▄▄▄█ █▀▀▀▀▀█ " + echo " █ ███ █ ▄▄▄▄▀▄▀▄▀ █ ███ █ " + echo " █ ▀▀▀ █ ▄█ ▄█▄▄▀ █ ▀▀▀ █ " + echo " ▀▀▀▀▀▀▀ ▀▄█ █ █ █ ▀▀▀▀▀▀▀ " + echo " ▀▀█▀▀▄▀▀▀▀▄█▀▀█ ▀ █ ▀ █ " + echo " █▄█ ▄▄▀▄▄ ▀ ▄ ▀█▄▄▄▄ ▀ ▀█ " + echo " ▄ ▄▀█ ▀▄▀▀▀▄ ▄█▀▄█▀▄▀▄▀█▀ " + echo " █ ▄▄█▄▀▄█ ▄▄▄ ▀ ▄▀██▀ ▀█ " + echo " ▀ ▀ ▀ █ ▀▄ ▀▀█▀▀▀█▄▀ " + echo " █▀▀▀▀▀█ ▀█ ▄▀▀ █ ▀ █▄▀██ " + echo " █ ███ █ █▀▄▄▀ █▀███▀█▄██▄ " + echo " █ ▀▀▀ █ ██ ▀ █▄█ ▄▄▄█▀ █ " + echo " ▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀▀▀▀▀▀ " + echo " " + + if [[ -z ${OMARCHY_USER-} ]]; then + echo "You can retry by running: ~/.automated_script.sh" + else + echo "You can retry by running: bash ~/.local/share/omarchy/install.sh || bash" + chroot_bash + fi +} + +trap catch_errors ERR + if [[ $(tty) == "/dev/tty1" ]]; then # Configurator for user information, disk selection, and wifi configuration ./configurator