diff --git a/0-preinstall.sh b/0-preinstall.sh index 0032271..d8eeef6 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 ~/$PROJECTNAME /mnt/root/ +cp -R ~/$SCRIPTHOME /mnt/root/ cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist echo "--------------------------------------" diff --git a/1-setup.sh b/1-setup.sh index cee3540..5a86ad3 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -264,11 +264,6 @@ 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)) @@ -286,14 +281,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}/$PROJECTNAME/install.conf +echo "username=$username" >> ${HOME}/$SCRIPTHOME/install.conf fi if [ $(whoami) = "root" ]; then useradd -m -G wheel,libvirt -s /bin/bash $username passwd $username - cp -R /root/$PROJECTNAME /home/$username/ - chown -R $username: /home/$username/$PROJECTNAME + cp -R /root/$SCRIPTHOME /home/$username/ + chown -R $username: /home/$username/$SCRIPTHOME else echo "You are already a user proceed with aur installs" fi diff --git a/2-user.sh b/2-user.sh index a498352..8c8e4de 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/$PROJECTNAME/dotfiles/* $HOME/.config/ +cp -r $HOME/$SCRIPTHOME/dotfiles/* $HOME/.config/ pip install konsave -konsave -i $HOME/$PROJECTNAME/kde.knsv +konsave -i $HOME/$SCRIPTHOME/kde.knsv sleep 1 konsave -a kde diff --git a/3-post-setup.sh b/3-post-setup.sh index 277b569..2ede8fa 100755 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -41,12 +41,4 @@ 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 - -# Replace in the same state -cd $pwd -echo " -############################################################################### -# Done - Please Eject Install Media and Reboot -############################################################################### -" +sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers \ No newline at end of file diff --git a/archnikus.sh b/archnikus.sh deleted file mode 100644 index fd08e23..0000000 --- a/archnikus.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/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 new file mode 100644 index 0000000..c8f7274 --- /dev/null +++ b/archtitus.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Find the name of the folder the scripts are in + +# X! Still erroring out, doesnt get the directory no matter what. + +if [ -L $0 ] ; then + ME=$(readlink $0) +else + ME=$0 +fi +dir=$(dirname $ME) + +export SCRIPTHOME="$(basename -- $dir)" +echo "Scripts are in dir named $SCRIPTHOME" + + bash 0-preinstall.sh + arch-chroot /mnt /root/$SCRIPTHOME/1-setup.sh + source /mnt/root/$SCRIPTHOME/install.conf + arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/$SCRIPTHOME/2-user.sh + arch-chroot /mnt /root/$SCRIPTHOME/3-post-setup.sh + +# Replace in the same state +cd $PWD +echo " +############################################################################### +# Done - Please Eject Install Media and Reboot (you can just type 'reboot') +############################################################################### +" \ No newline at end of file diff --git a/kderice-backup.sh b/kderice-backup.sh index 3c45d7a..883e40a 100755 --- a/kderice-backup.sh +++ b/kderice-backup.sh @@ -1,5 +1,5 @@ #!/bin/bash -cp -r $HOME/.config/kitty $HOME/$PROJECTNAME/dotfiles/kitty +cp -r $HOME/.config/kitty $HOME/$SCRIPTHOME/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 fb26bc6..4b3a481 100755 --- a/kderice-restore.sh +++ b/kderice-restore.sh @@ -1,8 +1,8 @@ #!/bin/bash export PATH=$PATH:~/.local/bin -cp -r $HOME/$PROJECTNAME/dotfiles/* $HOME/.config/ +cp -r $HOME/$SCRIPTHOME/dotfiles/* $HOME/.config/ pip install konsave -konsave -i $HOME/$PROJECTNAME/kde.knsv +konsave -i $HOME/$SCRIPTHOME/kde.knsv sleep 1 konsave -a kde