Fix Bugs
fixing various syntax errors and incorrect variables from multiple merges
This commit is contained in:
parent
13bb48245e
commit
a6b40493b3
40
1-setup.sh
40
1-setup.sh
|
|
@ -9,10 +9,10 @@ echo -ne "
|
||||||
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Automated Arch Linux Installer
|
Automated Arch Linux Installer
|
||||||
SCRIPTHOME: $SCRIPTHOME
|
SCRIPTHOME: ArchTitus
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
"
|
"
|
||||||
source /root/$SCRIPTHOME/setup.conf
|
source /root/ArchTitus/setup.conf
|
||||||
echo -ne "
|
echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Network Setup
|
Network Setup
|
||||||
|
|
@ -70,7 +70,7 @@ echo -ne "
|
||||||
Installing Base System
|
Installing Base System
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
"
|
"
|
||||||
cat /root/$SCRIPTHOME/pkg-files/pacman-pkgs.txt | while read line
|
cat /root/ArchTitus/pkg-files/pacman-pkgs.txt | while read line
|
||||||
do
|
do
|
||||||
echo "INSTALLING: ${line}"
|
echo "INSTALLING: ${line}"
|
||||||
sudo pacman -S --noconfirm --needed ${line}
|
sudo pacman -S --noconfirm --needed ${line}
|
||||||
|
|
@ -109,8 +109,8 @@ elif grep -E "Integrated Graphics Controller" <<< ${gpu_type}; then
|
||||||
elif grep -E "Intel Corporation UHD" <<< ${gpu_type}; then
|
elif grep -E "Intel Corporation UHD" <<< ${gpu_type}; then
|
||||||
pacman -S libva-intel-driver libvdpau-va-gl lib32-vulkan-intel vulkan-intel libva-intel-driver libva-utils lib32-mesa --needed --noconfirm
|
pacman -S libva-intel-driver libvdpau-va-gl lib32-vulkan-intel vulkan-intel libva-intel-driver libva-utils lib32-mesa --needed --noconfirm
|
||||||
fi
|
fi
|
||||||
|
#SETUP IS WRONG THIS IS RUN
|
||||||
if ! source install.conf; then
|
if ! source setup.conf; then
|
||||||
# Loop through user input until the user gives a valid username
|
# Loop through user input until the user gives a valid username
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
|
@ -123,17 +123,14 @@ if ! source install.conf; then
|
||||||
fi
|
fi
|
||||||
echo "Incorrect username."
|
echo "Incorrect username."
|
||||||
done
|
done
|
||||||
# convert name to lowercase before saving to install.conf
|
# convert name to lowercase before saving to setup.conf
|
||||||
echo "username=${username,,}" >> ${HOME}/${SCRIPTHOME}/install.conf
|
echo "username=${username,,}" >> ${HOME}/ArchTitus/setup.conf
|
||||||
fi
|
|
||||||
if [ $(whoami) = "root" ];
|
|
||||||
then
|
|
||||||
useradd -m -G wheel,libvirt -s /bin/bash $username
|
|
||||||
passwd $username
|
|
||||||
cp -R ${HOME}/${SCRIPTHOME} /home/${username}/
|
|
||||||
chown -R ${username}: /home/${username}/${SCRIPTHOME}
|
|
||||||
|
|
||||||
# Loop through user input until the user gives a valid hostname, but allow the user to force save
|
#Set Password
|
||||||
|
read -p "Please enter password:" password
|
||||||
|
echo "password=${password,,}" >> ${HOME}/ArchTitus/setup.conf
|
||||||
|
|
||||||
|
# Loop through user input until the user gives a valid hostname, but allow the user to force save
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
read -p "Please name your machine:" nameofmachine
|
read -p "Please name your machine:" nameofmachine
|
||||||
|
|
@ -143,14 +140,15 @@ then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
# if validation fails allow the user to force saving of the hostname
|
# if validation fails allow the user to force saving of the hostname
|
||||||
read -p "Username doesn't seem correct. Do you still want to save it? (y/n)" force
|
read -p "Hostname doesn't seem correct. Do you still want to save it? (y/n)" force
|
||||||
if [[ "${force,,}" = "y" ]]
|
if [[ "${force,,}" = "y" ]]
|
||||||
then
|
then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo ${nameofmachine} > /etc/hostname
|
echo "nameofmachine=${nameofmachine,,}" >> ${HOME}/ArchTitus/setup.conf
|
||||||
|
fi
|
||||||
echo -ne "
|
echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Adding User
|
Adding User
|
||||||
|
|
@ -162,10 +160,10 @@ if [ $(whoami) = "root" ]; then
|
||||||
|
|
||||||
# use chpasswd to enter $username:$password
|
# use chpasswd to enter $username:$password
|
||||||
echo "$USERNAME:$PASSWORD" | chpasswd
|
echo "$USERNAME:$PASSWORD" | chpasswd
|
||||||
cp -R /root/$SCRIPTHOME /home/$USERNAME/
|
cp -R /root/ArchTitus /home/$USERNAME/
|
||||||
chown -R $USERNAME: /home/$USERNAME/$SCRIPTHOME
|
chown -R $USERNAME: /home/$USERNAME/ArchTitus
|
||||||
# enter $hostname to /etc/hostname
|
# enter $nameofmachine to /etc/hostname
|
||||||
echo $HOSTNAME > /etc/hostname
|
echo $nameofmachine > /etc/hostname
|
||||||
else
|
else
|
||||||
echo "You are already a user proceed with aur installs"
|
echo "You are already a user proceed with aur installs"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
10
2-user.sh
10
2-user.sh
|
|
@ -9,13 +9,13 @@ echo -ne "
|
||||||
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Automated Arch Linux Installer
|
Automated Arch Linux Installer
|
||||||
SCRIPTHOME: $SCRIPTHOME
|
SCRIPTHOME: ArchTitus
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
|
|
||||||
Installing AUR Softwares
|
Installing AUR Softwares
|
||||||
"
|
"
|
||||||
# You can solve users running this script as root with this and then doing the same for the next for statement. However I will leave this up to you.
|
# You can solve users running this script as root with this and then doing the same for the next for statement. However I will leave this up to you.
|
||||||
source ~/$SCRIPTHOME/setup.conf
|
source ~/ArchTitus/setup.conf
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
git clone "https://aur.archlinux.org/yay.git"
|
git clone "https://aur.archlinux.org/yay.git"
|
||||||
|
|
@ -27,12 +27,12 @@ git clone "https://github.com/ChrisTitusTech/zsh"
|
||||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
|
||||||
ln -s "~/zsh/.zshrc" ~/.zshrc
|
ln -s "~/zsh/.zshrc" ~/.zshrc
|
||||||
|
|
||||||
yay -S --noconfirm --needed - < ~/$SCRIPTHOME/pkg-files/aur-pkgs.txt
|
yay -S --noconfirm --needed - < ~/ArchTitus/pkg-files/aur-pkgs.txt
|
||||||
|
|
||||||
export PATH=$PATH:~/.local/bin
|
export PATH=$PATH:~/.local/bin
|
||||||
cp -r ~/$SCRIPTHOME/dotfiles/* ~/.config/
|
cp -r ~/ArchTitus/dotfiles/* ~/.config/
|
||||||
pip install konsave
|
pip install konsave
|
||||||
konsave -i ~/$SCRIPTHOME/kde.knsv
|
konsave -i ~/ArchTitus/kde.knsv
|
||||||
sleep 1
|
sleep 1
|
||||||
konsave -a kde
|
konsave -a kde
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ echo -ne "
|
||||||
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Automated Arch Linux Installer
|
Automated Arch Linux Installer
|
||||||
SCRIPTHOME: $SCRIPTHOME
|
SCRIPTHOME: ArchTitus
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
|
|
||||||
Final Setup and Configurations
|
Final Setup and Configurations
|
||||||
GRUB EFI Bootloader Install & Check
|
GRUB EFI Bootloader Install & Check
|
||||||
"
|
"
|
||||||
source /root/$SCRIPTHOME/setup.conf
|
source /root/ArchTitus/setup.conf
|
||||||
if [[ -d "/sys/firmware/efi" ]]; then
|
if [[ -d "/sys/firmware/efi" ]]; then
|
||||||
grub-install --efi-directory=/boot ${DISK}
|
grub-install --efi-directory=/boot ${DISK}
|
||||||
fi
|
fi
|
||||||
|
|
@ -79,8 +79,8 @@ sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /et
|
||||||
# Add sudo rights
|
# Add sudo rights
|
||||||
sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
|
sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
|
||||||
|
|
||||||
rm -r /root/$SCRIPTHOME
|
rm -r /root/ArchTitus
|
||||||
rm -r /home/$username/$SCRIPTHOME
|
rm -r /home/$username/ArchTitus
|
||||||
|
|
||||||
# Replace in the same state
|
# Replace in the same state
|
||||||
cd $pwd
|
cd $pwd
|
||||||
|
|
|
||||||
|
|
@ -147,8 +147,8 @@ set_option USERNAME ${username,,} # convert to lower case as in issue #109
|
||||||
echo -ne "Please enter your password: \n"
|
echo -ne "Please enter your password: \n"
|
||||||
read -s password # read password without echo
|
read -s password # read password without echo
|
||||||
set_option PASSWORD $password
|
set_option PASSWORD $password
|
||||||
read -rep "Please enter your hostname: " hostname
|
read -rep "Please enter your hostname: " nameofmachine
|
||||||
set_option HOSTNAME $hostname
|
set_option nameofmachine $nameofmachine
|
||||||
}
|
}
|
||||||
# More features in future
|
# More features in future
|
||||||
# language (){}
|
# language (){}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue