Mise à jour du script

This commit is contained in:
2024-10-25 23:40:19 +02:00
parent ca6cdd921a
commit 01d1f12fcf

View File

@@ -1,5 +1,8 @@
#!/bin/bash
# Définir les variables
USER=$(whoami)
# Vérifier si Git est déjà installé
if! [ -x "$(command -v git)" ]; then
# Si Git n'est pas installé, demander confirmation avant installation
@@ -8,8 +11,8 @@ if! [ -x "$(command -v git)" ]; then
if [[ $REPLY =~ ^[Oo]$ ]]; then
# Si l'utilisateur accepte, installer Git
echo "Installation de Git en cours..."
apt update
apt install -y git
sudo apt update
sudo apt install -y git
echo "Git a été installé avec succès!"
read -p "Veuillez saisir votre nom d'utilisateur Git: " username
read -p "Veuillez saisir votre adresse e-mail Git: " email
@@ -19,8 +22,6 @@ if! [ -x "$(command -v git)" ]; then
else
echo "Installation de Git annulée."
fi
else
echo "Git est déjà installé sur votre système."
fi
# Vérifier si btop est déjà installé