From 5c32d80998f4ba34cc8803554793b67b875587d5 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Sun, 24 Oct 2021 19:48:31 -0700 Subject: [PATCH] Add project name flexibility added a var PROJECTNAME which is set in the archnikus.sh or archtitus.sh file --- 0-preinstall.sh | 2 +- 1-setup.sh | 6 +++--- 2-user.sh | 4 ++-- archnikus.sh | 10 ++++++---- kderice-backup.sh | 2 +- kderice-restore.sh | 4 ++-- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/0-preinstall.sh b/0-preinstall.sh index 0e8cf61..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 ~/ArchTitus /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 0714b88..cee3540 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -286,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}/ArchTitus/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/ArchTitus /home/$username/ - chown -R $username: /home/$username/ArchTitus + 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 4fe3e47..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/ArchTitus/dotfiles/* $HOME/.config/ +cp -r $HOME/$PROJECTNAME/dotfiles/* $HOME/.config/ pip install konsave -konsave -i $HOME/ArchTitus/kde.knsv +konsave -i $HOME/$PROJECTNAME/kde.knsv sleep 1 konsave -a kde diff --git a/archnikus.sh b/archnikus.sh index 51acf05..fd08e23 100644 --- a/archnikus.sh +++ b/archnikus.sh @@ -1,7 +1,9 @@ #!/bin/bash +PROJECTNAME="ArchNikus" + bash 0-preinstall.sh - arch-chroot /mnt /root/ArchNikus/1-setup.sh - source /mnt/root/ArchNikus/install.conf - arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/ArchNikus/2-user.sh - arch-chroot /mnt /root/ArchNikus/3-post-setup.sh \ No newline at end of file + 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/kderice-backup.sh b/kderice-backup.sh index dbc109f..3c45d7a 100755 --- a/kderice-backup.sh +++ b/kderice-backup.sh @@ -1,5 +1,5 @@ #!/bin/bash -cp -r $HOME/.config/kitty $HOME/ArchTitus/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 ee2b8aa..fb26bc6 100755 --- a/kderice-restore.sh +++ b/kderice-restore.sh @@ -1,8 +1,8 @@ #!/bin/bash export PATH=$PATH:~/.local/bin -cp -r $HOME/ArchTitus/dotfiles/* $HOME/.config/ +cp -r $HOME/$PROJECTNAME/dotfiles/* $HOME/.config/ pip install konsave -konsave -i $HOME/ArchTitus/kde.knsv +konsave -i $HOME/$PROJECTNAME/kde.knsv sleep 1 konsave -a kde