Moved Dialog to the end

This commit is contained in:
DarkXero-dev 2024-06-10 16:24:09 +03:00
parent 21dc152de5
commit 0ea213e297
2 changed files with 137 additions and 15 deletions

View file

@ -64,19 +64,6 @@ main_menu() {
# Display main menu
main_menu
# Prompt for adding XeroLinux repo using dialog
if dialog --stdout --title "XeroLinux Repository" --yesno "Would you like to add the XeroLinux repository?" 10 40; then
echo "Adding XeroLinux Repository..."
echo -e '\n[xerolinux]\nSigLevel = Optional TrustAll\nServer = https://repos.xerolinux.xyz/$repo/$arch' | tee -a /etc/pacman.conf
sed -i '/^\s*#\s*\[multilib\]/,/^$/ s/^#//' /etc/pacman.conf
fi
# Prompt for installing Paru/Toolkit using dialog
if dialog --stdout --title "Install Paru & Xero-Toolkit" --yesno "Would you like to install Paru & the Xero-Toolkit?" 10 40; then
echo "Installing Paru/Toolkit..."
pacman -Syy --noconfirm paru-bin xlapit-cli
fi
echo "Installing PipeWire packages..."
install_packages "gstreamer gst-libav gst-plugins-bad gst-plugins-base gst-plugins-ugly gst-plugins-good libdvdcss alsa-utils alsa-firmware pavucontrol lib32-pipewire-jack libpipewire pipewire-v4l2 pipewire-x11-bell pipewire-zeroconf realtime-privileges sof-firmware ffmpeg ffmpegthumbs ffnvcodec-headers"
@ -111,8 +98,23 @@ case $result in
;;
*)
echo "You are not running in a VM."
exit 1
;;
esac
dialog --msgbox "Installation Complete. Done, now exit and reboot. For further customization, if you opted to install our Toolkit, please find it in AppMenu under System or by typing xero-cli in terminal." 10 40
# Prompt for adding XeroLinux repo and installing Paru/Toolkit using dialog
if dialog --stdout --title "Add XeroLinux Repo & Install Toolkit" --yesno "\nWould you like to add the XeroLinux repository and install Paru & the Xero-Toolkit?\n\nIt is recommended as it will make things like driver and package configuration easier." 12 50; then
echo "Adding XeroLinux Repository..."
echo -e '\n[xerolinux]\nSigLevel = Optional TrustAll\nServer = https://repos.xerolinux.xyz/$repo/$arch' | tee -a /etc/pacman.conf
sed -i '/^\s*#\s*\[multilib\]/,/^$/ s/^#//' /etc/pacman.conf
echo "Installing Paru/Toolkit..."
pacman -Syy --noconfirm paru-bin xlapit-cli
fi
dialog --title "Installation Complete" --msgbox "\nInstallation Complete. Done, now exit and reboot.\n\nFor further customization, if you opted to install our Toolkit, please find it in AppMenu under System or by typing xero-cli in terminal." 12 50
# Exit chroot and reboot
clear
echo "Exiting chroot environment and rebooting system..."
sleep 2
exit
reboot