Skip to content

Commit

Permalink
Sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
KillianLucas committed Apr 9, 2024
1 parent 821ada3 commit 59ab1b2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@ else
# Assume a Debian-based or Fedora-based system
if command -v apt >/dev/null; then
echo "Installing Git on Debian-based Linux..."
sudo apt install git-all
# Check and install sudo if not present
if ! command -v sudo &> /dev/null; then
apt-get update && apt-get install -y sudo
fi
sudo apt install -y git-all
elif command -v dnf >/dev/null; then
echo "Installing Git on Fedora-based Linux..."
sudo dnf install git-all
# Check and install sudo if not present
if ! command -v sudo &> /dev/null; then
dnf install -y sudo
fi
sudo dnf install -y git-all
else
echo "Package manager not supported. Please install Git manually."
fi
Expand Down

0 comments on commit 59ab1b2

Please sign in to comment.