From c9264ca1eca7a0308430c6005514df472427ee66 Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 6 Oct 2017 09:14:19 -0700 Subject: [PATCH] new script with one partition --- one.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 one.sh diff --git a/one.sh b/one.sh new file mode 100755 index 0000000..a99e0f9 --- /dev/null +++ b/one.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +#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) +RED='\033[0;31m' +BLUE='\033[0;34m' +NC='\033[0m' + +#error() { dialog --title "Error!" --msgbox "We've run into a fatal-ish error. Check the LARBS.log file for more information" 10 60 && clear && 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" 15 60 || 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." 10 60 || exit + +dialog --no-cancel --inputbox "Enter a name for your computer." 10 60 2> comp + +timedatectl set-ntp true + +cat <> /mnt/etc/fstab + +curl http://lukesmith.xyz/larbs/chroot.sh > /mnt/chroot.sh && arch-chroot /mnt bash chroot.sh && rm /mnt/chroot.sh + +cat comp > /mnt/etc/hostname && rm comp + +dialog --defaultno --title "Final Qs" --yesno "Eject CD/ROM (if any)?" 5 30 && eject +dialog --defaultno --title "Final Qs" --yesno "Reboot computer?" 5 30 && reboot +dialog --defaultno --title "Final Qs" --yesno "Return to chroot environment?" 6 30 && arch-chroot /mnt +clear