From 4420558e4dc6abe7c81d8d1826a1a2b48061050d Mon Sep 17 00:00:00 2001 From: Nicholas Date: Thu, 28 Oct 2021 19:14:15 -0700 Subject: [PATCH] fix random merge i didnt do --- 0-preinstall.sh | 2 +- 1-setup.sh | 11 ++++++++--- 2-user.sh | 4 ++-- 3-post-setup.sh | 10 +++++++++- archnikus.sh | 9 +++++++++ archtitus.sh | 4 ---- kderice-backup.sh | 2 +- kderice-restore.sh | 4 ++-- 8 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 archnikus.sh diff --git a/0-preinstall.sh b/0-preinstall.sh index d8eeef6..0032271 100755 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -105,7 +105,7 @@ linux /vmlinuz-linux initrd /initramfs-linux.img options root=LABEL=ROOT rw rootflags=subvol=@ EOF -cp -R ~/$SCRIPTHOME /mnt/root/ +cp -R ~/$PROJECTNAME /mnt/root/ cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist echo "--------------------------------------" diff --git a/1-setup.sh b/1-setup.sh index 5a86ad3..cee3540 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -264,6 +264,11 @@ elif lspci | grep -E "Integrated Graphics Controller"; then pacman -S libva-intel-driver libvdpau-va-gl lib32-vulkan-intel vulkan-intel libva-intel-driver libva-utils --needed --noconfirm fi +# +# create a swapfile +# $ required for completion of scripts on lower end systems (under 8GB ram will need swap) +# + SWAPSIZEgb=2 SWAPSIZEmb=$((1024*$SWAPSIZEgb)) @@ -281,14 +286,14 @@ echo -e "Swap /swapfile created and configured wtih $SWAPSIZEgb GB\n" echo -e "\nDone!\n" if ! source install.conf; then read -p "Please enter username:" username -echo "username=$username" >> ${HOME}/$SCRIPTHOME/install.conf +echo "username=$username" >> ${HOME}/$PROJECTNAME/install.conf fi if [ $(whoami) = "root" ]; then useradd -m -G wheel,libvirt -s /bin/bash $username passwd $username - cp -R /root/$SCRIPTHOME /home/$username/ - chown -R $username: /home/$username/$SCRIPTHOME + cp -R /root/$PROJECTNAME /home/$username/ + chown -R $username: /home/$username/$PROJECTNAME else echo "You are already a user proceed with aur installs" fi diff --git a/2-user.sh b/2-user.sh index 8c8e4de..a498352 100755 --- a/2-user.sh +++ b/2-user.sh @@ -54,9 +54,9 @@ for PKG in "${PKGS[@]}"; do done export PATH=$PATH:~/.local/bin -cp -r $HOME/$SCRIPTHOME/dotfiles/* $HOME/.config/ +cp -r $HOME/$PROJECTNAME/dotfiles/* $HOME/.config/ pip install konsave -konsave -i $HOME/$SCRIPTHOME/kde.knsv +konsave -i $HOME/$PROJECTNAME/kde.knsv sleep 1 konsave -a kde diff --git a/3-post-setup.sh b/3-post-setup.sh index 2ede8fa..277b569 100755 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -41,4 +41,12 @@ echo " # Remove no password sudo rights sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers # Add sudo rights -sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers \ No newline at end of file +sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers + +# Replace in the same state +cd $pwd +echo " +############################################################################### +# Done - Please Eject Install Media and Reboot +############################################################################### +" diff --git a/archnikus.sh b/archnikus.sh new file mode 100644 index 0000000..fd08e23 --- /dev/null +++ b/archnikus.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +PROJECTNAME="ArchNikus" + + bash 0-preinstall.sh + arch-chroot /mnt /root/$PROJECTNAME/1-setup.sh + source /mnt/root/$PROJECTNAME/install.conf + arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/$PROJECTNAME/2-user.sh + arch-chroot /mnt /root/$PROJECTNAME/3-post-setup.sh \ No newline at end of file diff --git a/archtitus.sh b/archtitus.sh index 7073498..c51499e 100644 --- a/archtitus.sh +++ b/archtitus.sh @@ -1,10 +1,6 @@ #!/bin/bash # Find the name of the folder the scripts are in - -# X! Still erroring out, doesnt get the directory no matter what. -# I hate it - export SCRIPTHOME="$(basename -- $PWD)" echo "Scripts are in dir named $SCRIPTHOME" cd $PWD diff --git a/kderice-backup.sh b/kderice-backup.sh index 883e40a..3c45d7a 100755 --- a/kderice-backup.sh +++ b/kderice-backup.sh @@ -1,5 +1,5 @@ #!/bin/bash -cp -r $HOME/.config/kitty $HOME/$SCRIPTHOME/dotfiles/kitty +cp -r $HOME/.config/kitty $HOME/$PROJECTNAME/dotfiles/kitty konsave -s kde konsave -e kde \ No newline at end of file diff --git a/kderice-restore.sh b/kderice-restore.sh index 4b3a481..fb26bc6 100755 --- a/kderice-restore.sh +++ b/kderice-restore.sh @@ -1,8 +1,8 @@ #!/bin/bash export PATH=$PATH:~/.local/bin -cp -r $HOME/$SCRIPTHOME/dotfiles/* $HOME/.config/ +cp -r $HOME/$PROJECTNAME/dotfiles/* $HOME/.config/ pip install konsave -konsave -i $HOME/$SCRIPTHOME/kde.knsv +konsave -i $HOME/$PROJECTNAME/kde.knsv sleep 1 konsave -a kde