From 778e9e4706a259d5ed069478420c8d68d0c5a6c8 Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 24 Nov 2017 10:08:29 -0700 Subject: [PATCH] fixes for web compatibility --- docs/README.md | 2 +- src/arch.sh | 2 +- src/chroot.sh | 2 +- src/test.sh | 11 ------ src/todo/chrootp.sh | 21 +++++++++++ src/{ => todo}/larbs_userp.sh | 0 src/{ => todo}/larbsp.sh | 0 src/todo/parabola.sh | 69 +++++++++++++++++++++++++++++++++++ www/.htaccess | 4 ++ www/index.html | 2 +- www/{styles.css => style.css} | 0 11 files changed, 98 insertions(+), 15 deletions(-) delete mode 100644 src/test.sh create mode 100755 src/todo/chrootp.sh rename src/{ => todo}/larbs_userp.sh (100%) rename src/{ => todo}/larbsp.sh (100%) create mode 100755 src/todo/parabola.sh create mode 100644 www/.htaccess rename www/{styles.css => style.css} (100%) diff --git a/docs/README.md b/docs/README.md index 2390c97..7ccabce 100644 --- a/docs/README.md +++ b/docs/README.md @@ -42,7 +42,7 @@ Blender, etc.). This is just as easy. Log in as the root user and run the following. ```sh -curl -O http://larbs.xyz/larbs.sh #Downloads the script. +curl -LO http://larbs.xyz/larbs.sh #Downloads the script. bash larbs.sh #Runs it. ``` diff --git a/src/arch.sh b/src/arch.sh index e507052..112fcb0 100755 --- a/src/arch.sh +++ b/src/arch.sh @@ -59,7 +59,7 @@ pacstrap /mnt base base-devel genfstab -U /mnt >> /mnt/etc/fstab -curl http://lukesmith.xyz/larbs/chroot.sh > /mnt/chroot.sh && arch-chroot /mnt bash chroot.sh && rm /mnt/chroot.sh +curl https://raw.githubusercontent.com/LukeSmithxyz/LARBS/master/src/chroot.sh > /mnt/chroot.sh && arch-chroot /mnt bash chroot.sh && rm /mnt/chroot.sh cat comp > /mnt/etc/hostname && rm comp diff --git a/src/chroot.sh b/src/chroot.sh index 1786cdf..efa3d12 100755 --- a/src/chroot.sh +++ b/src/chroot.sh @@ -17,5 +17,5 @@ systemctl start NetworkManager pacman --noconfirm --needed -S grub && grub-install --target=i386-pc /dev/sda && grub-mkconfig -o /boot/grub/grub.cfg pacman --noconfirm --needed -S dialog -larbs() { curl -O http://larbs.xyz/larbs.sh && bash larbs.sh ;} +larbs() { curl -LO http://larbs.xyz/larbs.sh && bash larbs.sh ;} 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" 15 60 && larbs diff --git a/src/test.sh b/src/test.sh deleted file mode 100644 index 54beeb2..0000000 --- a/src/test.sh +++ /dev/null @@ -1,11 +0,0 @@ -cat << "EOF" - - - #" m " " m " m"" " "# - # mmm m m mm#mm mmm mmm mmmmm mmm m mm mm#mm mmm m mm mmm mmm mm#mm mmm mmm mmm # - # " # # # # # # " # # # # #" # # #" # #" # # " # # # #" # # " # - # m"""# # # # # """m # # # # # # # #"""" # # """m # # # #"""" """m # - # "mm"# "mm"# "mm mm#mm "mmm" # # # mm#mm # # "mm "#mm" # # "mmm" mm#mm # mm#mm "#mm" "mmm" # - "" "" - -EOF diff --git a/src/todo/chrootp.sh b/src/todo/chrootp.sh new file mode 100755 index 0000000..1786cdf --- /dev/null +++ b/src/todo/chrootp.sh @@ -0,0 +1,21 @@ +#Potential variables: timezone, lang and local + +passwd + +ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime + +hwclock --systohc + +echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen +echo "en_US ISO-8859-1" >> /etc/locale.gen +locale-gen + +pacman --noconfirm --needed -S networkmanager +systemctl enable NetworkManager +systemctl start NetworkManager + +pacman --noconfirm --needed -S grub && grub-install --target=i386-pc /dev/sda && grub-mkconfig -o /boot/grub/grub.cfg + +pacman --noconfirm --needed -S dialog +larbs() { curl -O http://larbs.xyz/larbs.sh && bash larbs.sh ;} +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" 15 60 && larbs diff --git a/src/larbs_userp.sh b/src/todo/larbs_userp.sh similarity index 100% rename from src/larbs_userp.sh rename to src/todo/larbs_userp.sh diff --git a/src/larbsp.sh b/src/todo/larbsp.sh similarity index 100% rename from src/larbsp.sh rename to src/todo/larbsp.sh diff --git a/src/todo/parabola.sh b/src/todo/parabola.sh new file mode 100755 index 0000000..7857c1e --- /dev/null +++ b/src/todo/parabola.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +#This is a lazy script I have for auto-installing Parabola. +#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' + +dialog --defaultno --title "DON'T BE A BRAINLET!" --yesno "This is an Parabola 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 Parabola.\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 Parabola.\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/chrootp.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 diff --git a/www/.htaccess b/www/.htaccess new file mode 100644 index 0000000..e1714eb --- /dev/null +++ b/www/.htaccess @@ -0,0 +1,4 @@ +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^([^\.]+)$ $1.html [NC,L] +Redirect /larbs.sh https://raw.githubusercontent.com/LukeSmithxyz/LARBS/master/rc/larbs.sh diff --git a/www/index.html b/www/index.html index cab5015..02012d4 100644 --- a/www/index.html +++ b/www/index.html @@ -29,7 +29,7 @@

In any install of Arch Linux, simply log in as the root user and run the following in the terminal:

-curl -O larbs.xyz/larbs.sh
+curl -LO larbs.xyz/larbs.sh
bash larbs.sh diff --git a/www/styles.css b/www/style.css similarity index 100% rename from www/styles.css rename to www/style.css