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