From 4edb677eeef986ceb4eacfdedd06f86f475ddf21 Mon Sep 17 00:00:00 2001 From: Rodolfo Date: Tue, 2 Jul 2024 15:23:27 +0800 Subject: [PATCH] Tweak: Arm archsetup.sh and start-setup.sh. Do not run these unless you want to install things --- archsetup.sh | 56 +++++++++++++++++++++++++------------------------- start-setup.sh | 13 ++++++------ 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/archsetup.sh b/archsetup.sh index d5ecffe..02f2c9a 100755 --- a/archsetup.sh +++ b/archsetup.sh @@ -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 diff --git a/start-setup.sh b/start-setup.sh index 2e5dc69..e816eca 100755 --- a/start-setup.sh +++ b/start-setup.sh @@ -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)"