Adds $SCRIPTHOME var, replacing hardcoded file paths
Just adds dynamic file repo naming for people forking the project. When they rename their repository, it will maintain the validity of the file paths, which used to be hard coded, hopefully this makes forking the project less error prone, and increases portability
This commit is contained in:
parent
a372b52c56
commit
a08edc2071
|
|
@ -122,7 +122,7 @@ linux /vmlinuz-linux
|
|||
initrd /initramfs-linux.img
|
||||
options root=LABEL=ROOT rw rootflags=subvol=@
|
||||
EOF
|
||||
cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus
|
||||
cp -R ${SCRIPT_DIR} /mnt/root/$SCRIPTHOME
|
||||
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist
|
||||
echo "--------------------------------------"
|
||||
echo "-- Check for low memory systems <8G --"
|
||||
|
|
|
|||
|
|
@ -219,14 +219,14 @@ fi
|
|||
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}/$SCRIPTHOME/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/$SCRIPTHOME /home/$username/
|
||||
chown -R $username: /home/$username/$SCRIPTHOME
|
||||
read -p "Please name your machine:" nameofmachine
|
||||
echo $nameofmachine > /etc/hostname
|
||||
else
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@ for PKG in "${PKGS[@]}"; do
|
|||
done
|
||||
|
||||
export PATH=$PATH:~/.local/bin
|
||||
cp -r $HOME/ArchTitus/dotfiles/* $HOME/.config/
|
||||
cp -r $HOME/$SCRIPTHOME/dotfiles/* $HOME/.config/
|
||||
pip install konsave
|
||||
konsave -i $HOME/ArchTitus/kde.knsv
|
||||
konsave -i $HOME/$SCRIPTHOME/kde.knsv
|
||||
sleep 1
|
||||
konsave -a kde
|
||||
|
||||
|
|
|
|||
|
|
@ -46,8 +46,3 @@ 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
|
||||
###############################################################################
|
||||
"
|
||||
|
|
|
|||
18
archtitus.sh
18
archtitus.sh
|
|
@ -1,7 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Find the name of the folder the scripts are in
|
||||
export SCRIPTHOME="$(basename -- $PWD)"
|
||||
echo "Scripts are in dir named $SCRIPTHOME"
|
||||
|
||||
bash 0-preinstall.sh
|
||||
arch-chroot /mnt /root/ArchTitus/1-setup.sh
|
||||
source /mnt/root/ArchTitus/install.conf
|
||||
arch-chroot /mnt /usr/bin/runuser -u $username -- /home/$username/ArchTitus/2-user.sh
|
||||
arch-chroot /mnt /root/ArchTitus/3-post-setup.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
|
||||
|
||||
echo "
|
||||
###############################################################################
|
||||
# Done - Please Eject Install Media and Reboot
|
||||
###############################################################################
|
||||
"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
cp -r $HOME/.config/kitty $HOME/ArchTitus/dotfiles/kitty
|
||||
cp -r $HOME/.config/kitty $HOME/$SCRIPTHOME/dotfiles/kitty
|
||||
konsave -s kde
|
||||
konsave -e kde
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
export PATH=$PATH:~/.local/bin
|
||||
cp -r $HOME/ArchTitus/dotfiles/* $HOME/.config/
|
||||
cp -r $HOME/$SCRIPTHOME/dotfiles/* $HOME/.config/
|
||||
pip install konsave
|
||||
konsave -i $HOME/ArchTitus/kde.knsv
|
||||
konsave -i $HOME/$SCRIPTHOME/kde.knsv
|
||||
sleep 1
|
||||
konsave -a kde
|
||||
|
|
|
|||
Loading…
Reference in New Issue