#This is a lazy script I have for auto-installing Arch.
#It's not officially part of LARBS, but I use it for testing.
#DO NOT RUN THIS YOURSELF because Step 1 is it reformatting /dev/sda WITHOUT confirmation,
#which means RIP in peace qq your data unless you've already backed up all of your drive.
pacman -S --noconfirm dialog ||{echo"Error at script start: Are you sure you're running this as the root user? Are you sure you have an internet connection?"; exit;}
dialog --defaultno --title "DON'T BE A BRAINLET!" --yesno "This is an Arch install script that is very rough around the edges.\n\nOnly run this script if you're a big-brane who doesn't mind deleting your entire /dev/sda drive.\n\nThis script is only really for me so I can autoinstall Arch.\n\nt. Luke"1560||exit
dialog --defaultno --title "DON'T BE A BRAINLET!" --yesno "Do you think I'm meming? Only select yes to DELET your entire /dev/sda and reinstall Arch.\n\nTo stop this script, press no."1060||exit
dialog --no-cancel --inputbox "Enter a name for your computer."1060 2> comp
dialog --defaultno --title "Time Zone select" --yesno "Do you want use the default time zone(America/New_York)?.\n\nPress no for select your own time zone"1060&&echo"America/New_York" > tz.tmp || tzselect > tz.tmp
dialog --no-cancel --inputbox "Enter partitionsize in gb, separated by space (swap & root)."1060 2>psize
dialog --title "Install Luke's Rice" --yesno "This install script will easily let you access Luke's Auto-Rice Boostrapping Scripts (LARBS) which automatically install a full Arch Linux i3-gaps desktop environment.\n\nIf you'd like to install this, select yes, otherwise select no.\n\nLuke"1560&& larbs
### END
mv comp /mnt/etc/hostname
dialog --defaultno --title "Final Qs" --yesno "Reboot computer?"530&& reboot
dialog --defaultno --title "Final Qs" --yesno "Return to chroot environment?"630&& arch-chroot /mnt