File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Définir les couleurs
4+ GREEN=$( tput setaf 2)
5+ RED=$( tput setaf 1)
6+ BLUE=$( tput setaf 4)
7+ VIOLET=$( tput setaf 5)
8+ BOLD=$( tput bold)
9+ RESET=$( tput sgr0)
10+ # ######################################### INITIALISATION ROOT ##########################################
11+
12+ # Vérifier si l'utilisateur est root
13+ if [[ $EUID -ne 0 ]]; then
14+ echo " ${RED}${BOLD} Ce script doit être exécuté en tant que root${RESET} "
15+ # Demander le mot de passe
16+ sudo " $0 " " $@ "
17+ exit 1
18+ fi
19+
20+ # Le reste du script ici
21+
22+ # ######################################### YARN INSTALL ##################################################
23+
24+ # Préparation #
25+ apt-get remote cmdtest
26+ apt-get remove yarn
27+ # #
28+
29+ # Ajout de la clé #
30+ echo " "
31+ echo " ${GREEN}${BOLD} Ajout de la clé & du répertoire${RESET} "
32+ echo " "
33+
34+ sleep 1
35+
36+ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
37+ echo " deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
38+ # #
39+
40+ # # INSTALLATION DOCKER | Last Version ##
41+ echo " "
42+ echo " ${BLUE}${BOLD} Installation de la dernière version de yarn${RESET} "
43+ echo " "
44+
45+ apt-get update
46+ apt-get install yarn -y
You can’t perform that action at this time.
0 commit comments