Tweak: Arm archsetup.sh and start-setup.sh. Do not run these unless you want to install things

This commit is contained in:
Rodolfo 2024-07-02 15:23:27 +08:00
parent 9cd23abfbc
commit 4edb677eee
2 changed files with 34 additions and 35 deletions

View file

@ -16,16 +16,16 @@ while true; do
if [[ ! -z $repo ]]; then
if [[ ! -f /bin/git ]]; then
echo "Authentication Is Required. Enter $username's password"
echo "sudo pacman -S --noconfirm --needed git"
sudo pacman -S --noconfirm --needed git
echo ""
fi
if [[ ! -d $home_PATH/Repos ]]; then
echo "mkdir $home_PATH/Repos"
mkdir $home_PATH/Repos
fi
echo "git clone $repo $home_PATH/Repos/dotfiles"
git clone $repo $home_PATH/Repos/dotfiles
if [[ $? == 0 ]]; then
for file in $home_PATH/Repos/dotfiles/*; do
echo "ln -s $file $home_PATH/.config/"
ln -s $file $home_PATH/.config/
done
break
else
@ -58,9 +58,9 @@ echo " Install Packages "
echo "=================="
echo ""
echo "sudo pacman -S --noconfirm --needed base-devel"
sudo pacman -S --noconfirm --needed base-devel
while IFS= read -r line ; do
echo "sudo pacman -S --noconfirm --needed $line"
sudo pacman -S --noconfirm --needed $line
done < $scripts_PATH/arch-assets/archpkg.txt
echo -e "\n\n\n\n"
@ -73,29 +73,29 @@ echo ""
# Setup Firewall
echo "Setup UFW"
echo ""
echo "sudo ufw default deny incoming"
echo "sudo ufw default allow outgoing"
sudo ufw default deny incoming
sudo ufw default allow outgoing
# Allow SSH on Default port
echo "sudo ufw allow 22"
sudo ufw allow 22
# Allow SSH on Alternate Port
echo ""
read -p "Would you like to set an alternate SSH port? (Empty to skip) " sshPort
if [[ ! -z $sshPort && $sshPort =~ ^[0-9]+$ ]]; then
echo "sudo ufw allow $sshPort"
sudo ufw allow $sshPort
fi
echo "systemctl enable ufw"
systemctl enable ufw
# Setup Printer
echo "systemctl enable cups"
systemctl enable cups
# Setup Yay
while true;do
read -p "Do you want to install yay? (y/n) " answer
if [[ "${answer,,}" == "y" ]]; then
if [[ ! -d $home_PATH/Software ]]; then
echo "mkdir $home_PATH/Software"
mkdir $home_PATH/Software
fi
echo "git clone https://aur.archlinux.org/yay.git $home_PATH/Software/yay && cd $home_PATH/Software/yay && makepkg -si --noconfirm --needed && cd"
git clone https://aur.archlinux.org/yay.git $home_PATH/Software/yay && cd $home_PATH/Software/yay && makepkg -si --noconfirm --needed && cd
break
elif [[ "${answer,,}" == "n" ]]; then
break
@ -114,12 +114,12 @@ echo ""
# Get JetBrainsMono font
font_PATH="$home_PATH/.local/share/fonts"
if [[ ! -d $font_PATH ]]; then
echo "mkdir $font_PATH"
mkdir $font_PATH
fi
echo "cd $font_PATH"
echo "wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz"
echo "cd $font_PATH && tar -xvf JetBrainsMono.tar.xz"
echo "cd ''"
cd $font_PATH
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz
cd $font_PATH && tar -xvf JetBrainsMono.tar.xz
cd ""
echo ""
# Build pijulius's Picom
@ -127,15 +127,15 @@ echo ""
while true; do
read -p "Do you want to install the Pijulius's Picom? (y/n) " answer
if [[ "${answer,,}" == "y" ]]; then
echo "sudo pacman -S --noconfirm --needed "
echo "git clone https://github/pijulius/picom $home_PATH/Software/picom"
echo "cd $home_PATH/Software/picom"
echo "git checkout implemented-window-animations"
echo "git submodule update --init --recursive"
echo "meson --buildtype=release . build"
echo "ninja -C build"
echo "ninja -C build install"
echo "cd ''"
sudo pacman -S --noconfirm --needed
git clone https://github/pijulius/picom $home_PATH/Software/picom
cd $home_PATH/Software/picom
git checkout implemented-window-animations
git submodule update --init --recursive
meson --buildtype=release . build
ninja -C build
ninja -C build install
cd ""
break
elif [[ "${answer,,}" == "n" ]]; then
break

View file

@ -13,7 +13,7 @@ echo ""
# Check for Repos directory
if [[ ! -d /home/$(whoami)/Repos ]]; then
echo "mkdir /home/$(whoami)/Repos"
mkdir /home/$(whoami)/Repos
fi
script_PATH=$(pwd)
@ -22,7 +22,7 @@ if [[ -d /etc/apt ]]; then
while true; do
read -p "Are you using a Debian? (y/n)" answer
if [[ "${answer,,}" == "y" ]]; then
echo "bash script_PATH/debiansetup.sh"
bash script_PATH/debiansetup.sh
break
elif [[ "${answer,,}" == "n" ]]; then
echo "Use a compatible system (Debian/Arch)"
@ -34,20 +34,19 @@ if [[ -d /etc/apt ]]; then
elif [[ -d /etc/pacman ]]; then
while true; do
read -p "Are you using a Arch? (y/n)" answer
echo "${answer,,}"
if [[ "${answer,,}" == "y" ]]; then
# Check for git
if [[ ! -f /bin/git ]]; then
echo "Authentication Is Required. Enter $username's password"
echo "sudo pacman -S --noconfirm --needed git"
sudo pacman -S --noconfirm --needed git
echo ""
fi
# Get the Repo
if [[ ! -d /home/$(whoami)/Repos/arch-automated-installer ]]; then
echo "git clone https://gitea.barcelli.net/rodolfo/arch-automated-installer /home/$(whoami)/Repos/arch-automated-installer"
echo "cd /home/$(whoami)/Repos/arch-automated-installer"
git clone https://gitea.barcelli.net/rodolfo/arch-automated-installer /home/$(whoami)/Repos/arch-automated-installer
cd /home/$(whoami)/Repos/arch-automated-installer
fi
echo "bash script_PATH/archsetup.sh"
bash script_PATH/archsetup.sh
break
elif [[ "${answer,,}" == "n" ]]; then
echo "Use a compatible system (Debian/Arch)"