Update start-setup.sh use the correct package manager for the system

This commit is contained in:
Rodolfo 2024-07-02 15:11:08 +08:00
parent f16fecd685
commit 9cd23abfbc
2 changed files with 11 additions and 13 deletions

View file

@ -87,7 +87,6 @@ echo "systemctl enable ufw"
# Setup Printer # Setup Printer
echo "systemctl enable cups" echo "systemctl enable cups"
echo "systemctl start cups"
# Setup Yay # Setup Yay
while true;do while true;do

View file

@ -16,18 +16,6 @@ if [[ ! -d /home/$(whoami)/Repos ]]; then
echo "mkdir /home/$(whoami)/Repos" echo "mkdir /home/$(whoami)/Repos"
fi fi
# Check for git
if [[ ! -f /bin/git ]]; then
echo "Authentication Is Required. Enter $username's password"
echo "sudo pacman -S --noconfirm --needed git"
echo ""
fi
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"
fi
script_PATH=$(pwd) script_PATH=$(pwd)
if [[ -d /etc/apt ]]; then if [[ -d /etc/apt ]]; then
@ -48,6 +36,17 @@ elif [[ -d /etc/pacman ]]; then
read -p "Are you using a Arch? (y/n)" answer read -p "Are you using a Arch? (y/n)" answer
echo "${answer,,}" echo "${answer,,}"
if [[ "${answer,,}" == "y" ]]; then 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"
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"
fi
echo "bash script_PATH/archsetup.sh" echo "bash script_PATH/archsetup.sh"
break break
elif [[ "${answer,,}" == "n" ]]; then elif [[ "${answer,,}" == "n" ]]; then