Adds SCRIPTHOME var, removing file path hardcoding
Ready for pull request, Just adds a quick way for people forking the project to rename their repository and maintain the validity of the paths, which used to be hard coded, hopefully this makes forking the project less error prone
This commit is contained in:
parent
92495887b2
commit
ccd51b4241
|
|
@ -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 "--------------------------------------"
|
||||
|
|
|
|||
11
1-setup.sh
11
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
#!/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
|
||||
|
||||
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')
|
||||
###############################################################################
|
||||
"
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue