je créer un script qui permet de gérer yaourt et pacman et d'autre chose comme ajouter les dépôt de blackarch ( seule option pour l"instant )
Mais je ne sais pas quoi ajouté
donc j'attend des idées de votre part .
Merci bien
8 comments
Report bugs 1 #!/bin/bash
2 echo "Bienvenue dans GestionYaourt
3 1 installer dépot blackarch
4 2 Rechercher un logiciel dans les dépots
5 3 installer Yaourt ( si pas installer )
6 4 Mettre à jour les sources et paquets
7 5 Voir ses paquets insataller "
8 read choix
^––SC2162 read without -r will mangle backslashes.
9 if [ $choix = 1 ]
^––SC2086 Double quote to prevent globbing and word splitting.
10 then
11 curl -O http://blackarch.org/strap.sh && sha1sum strap.sh
12 chmod +x strap.sh
13 sudo ./strap.sh
14 fi
15 if [ $choix = 2 ]
^––SC2086 Double quote to prevent globbing and word splitting.
16 then
17 echo " Donner le paquet à chercher "
18 read paquet
^––SC2162 read without -r will mangle backslashes.
19 pacman -Ss $paquet
^––SC2086 Double quote to prevent globbing and word splitting.
20 fi
21 if [ $choix = 3 ]
^––SC2086 Double quote to prevent globbing and word splitting.
22 then
23 pacman -S yaourt
24 echo "Yaourt est installer "
25 fi
26 if [ $choix = 4 ]
^––SC2086 Double quote to prevent globbing and word splitting.
27 then
28 pacman -Syu
29 echo "Voilà systéme à jour :D "
30 fi
31 if [ $choix = 5 ]
^––SC2086 Double quote to prevent globbing and word splitting.
32 then
33 echo "Vos paquets installé sont : "
34 yaourt -Qs
35 fi
$paquet='yaourt'
if (pacman -Q "${paquet}" &>/dev/null); then
echo "ok intallé"
else
echo "pas installé"
fi
pacman -Qu | wc -l
affichemenu() { clear; echo "..."; echo -n "faites un choix entre 1 et 2 : " }
maj() { sudo pacman -Syu }
while [[ '1' == '1' ]]; do
affichemenu
read menu
case (menu)
1) maj ;;
2) cherchepaquet ;;
*) break
esac
done