Add project name flexibility

added a var PROJECTNAME which is set in the archnikus.sh or archtitus.sh file
This commit is contained in:
Nicholas 2021-10-24 19:48:31 -07:00
parent 0b545503f8
commit 5c32d80998
6 changed files with 15 additions and 13 deletions

View File

@ -105,7 +105,7 @@ linux /vmlinuz-linux
initrd /initramfs-linux.img initrd /initramfs-linux.img
options root=LABEL=ROOT rw rootflags=subvol=@ options root=LABEL=ROOT rw rootflags=subvol=@
EOF EOF
cp -R ~/ArchTitus /mnt/root/ cp -R ~/$PROJECTNAME /mnt/root/
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist
echo "--------------------------------------" echo "--------------------------------------"

View File

@ -286,14 +286,14 @@ echo -e "Swap /swapfile created and configured wtih $SWAPSIZEgb GB\n"
echo -e "\nDone!\n" echo -e "\nDone!\n"
if ! source install.conf; then if ! source install.conf; then
read -p "Please enter username:" username read -p "Please enter username:" username
echo "username=$username" >> ${HOME}/ArchTitus/install.conf echo "username=$username" >> ${HOME}/$PROJECTNAME/install.conf
fi fi
if [ $(whoami) = "root" ]; if [ $(whoami) = "root" ];
then then
useradd -m -G wheel,libvirt -s /bin/bash $username useradd -m -G wheel,libvirt -s /bin/bash $username
passwd $username passwd $username
cp -R /root/ArchTitus /home/$username/ cp -R /root/$PROJECTNAME /home/$username/
chown -R $username: /home/$username/ArchTitus chown -R $username: /home/$username/$PROJECTNAME
else else
echo "You are already a user proceed with aur installs" echo "You are already a user proceed with aur installs"
fi fi

View File

@ -54,9 +54,9 @@ for PKG in "${PKGS[@]}"; do
done done
export PATH=$PATH:~/.local/bin export PATH=$PATH:~/.local/bin
cp -r $HOME/ArchTitus/dotfiles/* $HOME/.config/ cp -r $HOME/$PROJECTNAME/dotfiles/* $HOME/.config/
pip install konsave pip install konsave
konsave -i $HOME/ArchTitus/kde.knsv konsave -i $HOME/$PROJECTNAME/kde.knsv
sleep 1 sleep 1
konsave -a kde konsave -a kde

View File

@ -1,7 +1,9 @@
#!/bin/bash #!/bin/bash
PROJECTNAME="ArchNikus"
bash 0-preinstall.sh bash 0-preinstall.sh
arch-chroot /mnt /root/ArchNikus/1-setup.sh arch-chroot /mnt /root/$PROJECTNAME/1-setup.sh
source /mnt/root/ArchNikus/install.conf source /mnt/root/$PROJECTNAME/install.conf
arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/ArchNikus/2-user.sh arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/$PROJECTNAME/2-user.sh
arch-chroot /mnt /root/ArchNikus/3-post-setup.sh arch-chroot /mnt /root/$PROJECTNAME/3-post-setup.sh

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
cp -r $HOME/.config/kitty $HOME/ArchTitus/dotfiles/kitty cp -r $HOME/.config/kitty $HOME/$PROJECTNAME/dotfiles/kitty
konsave -s kde konsave -s kde
konsave -e kde konsave -e kde

View File

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
export PATH=$PATH:~/.local/bin export PATH=$PATH:~/.local/bin
cp -r $HOME/ArchTitus/dotfiles/* $HOME/.config/ cp -r $HOME/$PROJECTNAME/dotfiles/* $HOME/.config/
pip install konsave pip install konsave
konsave -i $HOME/ArchTitus/kde.knsv konsave -i $HOME/$PROJECTNAME/kde.knsv
sleep 1 sleep 1
konsave -a kde konsave -a kde