made the scripts posix complient

This commit is contained in:
Zastian Pretorius
2021-05-30 22:56:54 +02:00
parent 04d7f9c5e2
commit 9726d5921e
2 changed files with 33 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
!#/bin/sh #!/bin/sh
pacman -Suy --noconfirm pacman -Suy --noconfirm
echo Installing all the needed pacages from main artix/arch repo echo Installing all the needed pacages from main artix/arch repo
@@ -44,28 +44,31 @@ pacman -S \
neofetch \ neofetch \
neovim \ neovim \
--noconfirm \ --noconfirm \
echo Pleas provide a username echo "Pleas profide a username:"
read name read -r name
useradd -m $name useradd -m "$name"
passwd $name passwd "$name"
echo adding user to some basic groups echo adding user to some basic groups
usermod -a -G wheel $name usermod -a -G wheel "$name"
usermod -a -G video $name usermod -a -G video "$name"
usermod -a -G uucp $name usermod -a -G uucp "$name"
mv setup2.sh /home/$user/setup2.sh mv setup2.sh /home/"$name"/setup2.sh
chown $user:$user /home/$user/setup2.sh chown "$name":"$name" /home/"$name"/setup2.sh
chmod +x /home/$user/setup2.sh chmod +x /home/"$name"/setup2.sh
read -p "pleas uncomment the wheel group to alow the user to use 'sudo':Press Enter to continu" printf "pleas uncomment the wheel group to alow the user to use 'sudo':Press Enter to continu"
read -r
EDITOR=nvim visudo EDITOR=nvim visudo
read -p "The system needs to reboot for the user to be added to the groups. \n \ printf "The system needs to reboot for the user to be added to the groups. \n \
after reboot log in as the new user \n \ after reboot log in as the new user \n \
Then run setup2.sh found in your home directory \n \ Then run setup2.sh found in your home directory \n \
\n " \n press enter to continu \n "
read -p "Press y to reboot or leave blanck to exit setup" confirm read -r
echo "Press y to reboot or leave blanck to exit setup"
read -r confirm
if [ $confirm = 'y' ] if [ "$confirm" = "y" ]
then then
reboot reboot
else else
exit 0 exit 0
fi

View File

@@ -1,12 +1,12 @@
!#/bin/sh #!/bin/sh
name=$USER name=$USER
cd /home/$name cd /home/"$name" || exit 1
echo installing paru pacage manager echo installing paru pacage manager
git clone https://aur.archlinux.org/paru-bin.git git clone https://aur.archlinux.org/paru-bin.git
cd paru-bin cd paru-bin || exit 1
makepkg -si --noconfirm makepkg -si --noconfirm
cd .. cd .. || exit 1
rm -R paru-bin rm -R paru-bin
echo installing pacages with paru echo installing pacages with paru
paru paru
@@ -17,17 +17,18 @@ paru -S \
nerd-fonts-iosevka \ nerd-fonts-iosevka \
noto-fonts-emoji \ noto-fonts-emoji \
git clone https://github.com/ZastianPretorius/config.git git clone https://github.com/ZastianPretorius/config.git
cd config cd config || exit 1
for entry in * for entry in *
do do
mv $entry /home/$name/$entry mv "$entry" /home/"$name"/"$entry"
done done
cd cd || exit 1
mkdir Pictures mkdir Pictures
cd Pictures cd Pictures || exit 1
git clone https://github.com/ZastianPretorius/wallpapers.git git clone https://github.com/ZastianPretorius/wallpapers.git
read -sp "sudo password:" pass printf "sudo password:"
sudo rc-update add NetworkManager | echo $pass read -r pass
suso rc-update add lightdm | echo $pass echo "$pass" | sudo rc-update add NetworkManager
echo "$pass" | suso rc-update add lightdm