Ajout des sudo pour le apt au script

This commit is contained in:
2024-10-25 23:49:16 +02:00
parent 6badc76f88
commit 2c8c1bc0d4

View File

@@ -32,8 +32,8 @@ if ! command -v btop &> /dev/null; then
if [[ $REPLY =~ ^[Oo]$ ]]; then
# Si l'utilisateur accepte, installer btop
echo "Installation de btop en cours..."
apt update
apt install -y btop
sudo apt update
sudo apt install -y btop
echo "btop a été installé avec succès!"
else
echo "Installation de btop annulée."
@@ -50,8 +50,8 @@ if ! command -v tree &> /dev/null; then
if [[ $REPLY =~ ^[Oo]$ ]]; then
# Si l'utilisateur accepte, installer tree
echo "Installation de tree en cours..."
apt update
apt install -y tree
sudo apt update
sudo apt install -y tree
echo "tree a été installé avec succès!"
else
echo "Installation de tree annulée."
@@ -112,8 +112,8 @@ if ! command -v npm &> /dev/null; then
if [[ $REPLY =~ ^[Oo]$ ]]; then
# Si l'utilisateur accepte, installer npm
echo "Installation de npm en cours..."
apt update
apt install -y npm
sudo apt update
sudo apt install -y npm
echo "npm a été installé avec succès!"
# Vérifier si nvm est déjà installé
if ! command -v nvm &> /dev/null; then