forked from JohnAOSC/fedorapostinstall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postinstall.sh
executable file
·159 lines (145 loc) · 6.26 KB
/
postinstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/bin/bash
rouge='\e[1;31m'
neutre='\e[0;m'
vert='\e[4;32m'
bleu='\e[1;34m'
jaune='\e[1;33m'
if [ "$UID" -eq "0" ]; then
echo -e "${rouge}lance le sans sudo, le mot de passe sera demandé dans le terminal lors de la 1ère action nécessitant le droit administrateur.${vert}"
exit
fi
echo -e "${vert}mise à jour des dépôts ${neutre}"
sudo dnf upgrade --refresh -y
echo -e "${bleu}Installation du depot RPMfusion Free ${neutre}"
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
echo -e "${jaune}Installation du depot RPMfusion Non-Free ${neutre}"
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
echo -e "${vert}Installation du depot Non-free tainted ${neutre}"
sudo dnf install rpmfusion-nonfree-release-tainted
#installation de shfmt pour mettre en forme les scripts bash.
sudo dnf install shfmt -y
if [ ! -f "/usr/bin/shellcheck" ]; then
echo -e "${vert}ShellCheck n'est pas installé voulez-vous l'installer?${neutre}[O/n]"
read -r shell
case $shell in
N | n)
echo "ShellCheck ne sera pas installé"
echo "le script continue la vérification et l'installation des programmes"
;;
O | o | *)
echo -e "${vert}installation de ShellCheck ${neutre}"
sudo dnf install -y ShellCheck
;;
esac
else
echo -e "${rouge}ShellCheck est déjà installé ${neutre}"
echo "le script continue la vérification et l'installation des programmes"
fi
if [ ! -f "/usr/bin/codium" ]; then
echo -e "${bleu}ont install vscodium ?${neutre}"
read -r codium
case $codium in
N | n)
echo "VSCodium ne sera pas installé, tu ne sera pas un programmeur jeune padawan"
echo "le script continue la vérification et l'installation des programmes"
;;
O | o | *)
echo -e "${jaune}j'installe VSCodium, tu sera un programmeur OpenSource Luke"
sudo rpmkeys --import https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg
printf "[gitlab.com_paulcarroty_vscodium_repo]\nname=download.vscodium.com\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg\nmetadata_expire=1h" | sudo tee -a /etc/yum.repos.d/vscodium.repo
sudo dnf install codium -y
;;
esac
else
echo -e "${rouge}VSCodium est déjà installé, tu es un grand monsieur ${neutre}"
echo "le script continue la vérification et l'installation des programmes"
fi
if [ ! -f "/usr/bin/keepassxc" ]; then
echo -e "${vert}tu veux installer Keepassxc? ${neutre}"
read -r keepassxc
case $keepassxc in
N | n)
echo "KeepassXC ne sera pas installé, honte à toi"
echo "le script continue la vérification et l'installation des programmes"
;;
O | o | *)
echo -e "${bleu}Installation de KeepassXC,la force Luke ${neutre}"
sudo dnf install keepassxc -y
;;
esac
else
echo -e "${rouge}KeepassXC est déjà installé, la force est déjà en toi ...${neutre}"
echo "Le script continue la vérification et l'installation des programmes"
fi
if [ ! -f "/etc/yum.repos.d/kernel-vanilla.repo" ]; then
echo -e "${jaune}ont install le kernel Vanilla ?${neutre}"
read -r vanilla
case $vanilla in
N | n)
echo "Vanilla ne sera pas installé, tu ne sera pas en avance sur ton temps jeune padawan "
echo "le script continue la vérification et l'installation des programmes"
;;
O | o | *)
echo -e "${bleu}j'installe le Vanilla kernel, tu sera en avance sur ton temps.${neutre}"
curl -s https://repos.fedorapeople.org/repos/thl/kernel-vanilla.repo | sudo tee /etc/yum.repos.d/kernel-vanilla.repo
sudo dnf config-manager --set-enabled kernel-vanilla-mainline
sudo dnf config-manager --save --setopt="kernel-vanilla-mainline.priority=99"
sudo dnf upgrade kernel kernel-core kernel-modules kernel-modules-extra --refresh
echo -e "${rouge}Un Reboot est requis pour utiliser le nouveau Kernel ${neutre}"
;;
esac
else
echo -e "${rouge}Vanilla est déjà présent, tu es un avant-gardiste ${neutre}"
echo "le script continue la vérification et l'installation des programmes"
fi
if [ ! -f "/usr/lib64/discord" ]; then
echo -e "${jaune}Veux-tu installer Discord? ${neutre}"
read -r discord
case $discord in
N | n)
echo "Discord ne sera pas installé"
echo "le script continue la vérification et l'installation des programmes"
;;
O | o | *)
echo -e "${bleu}Installation de Discord, Profite pour rejoindre le serveur de l'APDM ;-)${neutre}"
sudo dnf install discord -y
;;
esac
else
echo -e "${rouge}Discord est déjà installé, As-tu déjà rejoins l'APDM ?"
echo "Le script continue la vérification et l'installation des programmes"
fi
if [ ! -f "/usr/bin/nitrokey-app" ]; then
echo -e "${vert}Tu veux installer Nitrokey ?${neutre}"
read -r nitrokey
case $nitrokey in
N | n)
echo "Nitrokey ne sera pas installé tampis pour la sécurité de toute façons c'est surcoté ^^"
echo "le script continue la vérification et l'installation des programmes"
;;
O | o | *)
echo -e "${jaune}Installation de Nitrokey-app${neutre}"
sudo dnf install nitrokey-app -y
;;
esac
else
echo -e "${rouge}Nitrokey-app est déjà installé, As-tu déjà créer ta clé gnupg ?${neutre}"
echo "Le script continue la vérification et l'installation des programmes"
fi
if [ ! -f "/usr/bin/audacity" ]; then
echo -e "${vert}Tu veux installer Audacity-freeworld ?${neutre}"
read -r auda
case $auda in
N | n)
echo "Audacity ne sera pas installé tampis pour la création de podcast"
echo "le script continue la vérification et l'installation des programmes"
;;
O | o | *)
echo -e "${jaune}Installation d' Audacity-freeworld${neutre}"
sudo dnf install audacity-freeworld -y
;;
esac
else
echo -e "${rouge}Audacity est déjà installé, As-tu déjà configurer tes entrées ?${neutre}"
echo "Le script continue la vérification et l'installation des programmes"
fi