-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_system_packages_fedora
executable file
·238 lines (226 loc) · 6.67 KB
/
install_system_packages_fedora
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#!/bin/sh
#
# Install interesting packages for Fedora.
#
# This assumes that the current user is the user used to install
# packages and has the proper administrator privileges.
set -e
set -u
release="$(cat /etc/fedora-release)"
version=0
if [ "${release}" = "Fedora release 22 (Twenty Two)" ]; then
version=22
elif [ "${release}" = "Fedora release 23 (Twenty Three)" ]; then
version=23
elif [ "${release}" = "Fedora release 24 (Twenty Four)" ]; then
version=24
elif [ "${release}" = "Fedora release 25 (Twenty Five)" ]; then
version=25
elif [ "${release}" = "Fedora release 26 (Twenty Six)" ]; then
version=26
elif [ "${release}" = "Fedora release 27 (Twenty Seven)" ]; then
version=27
fi
# package manager
pm=
pm_check=
pm_update=
pm_upgrade=
pm_install=
pm_autoremove=
pm_cleanup=
# check if dnf is installed
if [ -z "$(command -v dnf 2> /dev/null)" ]; then
printf "warning: dnf not found.\n" 1>&2
else
pm="dnf"
pm_check="true"
pm_update="sudo ${pm} update"
pm_upgrade="true"
pm_install="sudo ${pm} -q -y install"
pm_autoremove="sudo ${pm} -q -y autoremove"
pm_cleanup="sudo ${pm} -q -y clean all"
sudo ${pm} install dnf-plugins-core
if [ "${version}" -le 26 ]; then
sudo ${pm} config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
fi
fi
# check if yum is installed, if package manager is not
if [ -z "${pm}" ]; then
if [ -z "$(command -v yum 2> /dev/null)" ]; then
printf "warning: yum not found.\n" 1>&2
else
pm="yum"
pm_check="true"
pm_update="sudo ${pm} update"
pm_upgrade="true"
pm_install="sudo ${pm} -q -y install"
pm_autoremove="sudo ${pm} -q -y autoremove"
pm_cleanup="sudo ${pm} -q -y clean all"
fi
fi
# check if package manager is installed
if [ -z "${pm}" ]; then
printf "error: Package manager not found.\n" 1>&2
exit 1
fi
# update and check packages
${pm_update}
if ! ${pm_check} ; then
printf "warning: Package manager check failed, continue anyway (y/n)?: "
read -r yn
if [ "${yn}" != "y" ]; then
exit 1
fi
fi
${pm_update}
# upgrade existing packages
${pm_upgrade}
# packages="${packages} arp-scan"
# packages="${packages} arp-sk"
# packages="${packages} arpoison"
packages="${packages} aspell"
packages="${packages} avrdude"
packages="${packages} azure-cli"
packages="${packages} bash-completion"
packages="${packages} bear"
packages="${packages} boost"
packages="${packages} boost-bcp"
packages="${packages} boost-build"
packages="${packages} cflow"
packages="${packages} clang"
# packages="${packages} clang-6"
packages="${packages} clang-7"
packages="${packages} clang-8"
packages="${packages} clang-9"
packages="${packages} clang-10"
packages="${packages} clang-11"
packages="${packages} clang-12"
# packages="${packages} clang-13"
packages="${packages} cmake"
packages="${packages} cmark-gfm"
packages="${packages} cppcheck"
packages="${packages} curl"
# packages="${packages} dfu-util"
packages="${packages} dita-ot"
packages="${packages} docbook"
packages="${packages} docbook-xsl"
packages="${packages} docker"
packages="${packages} docker-completion"
packages="${packages} docker-compose-completion"
packages="${packages} docker-machine-completion"
packages="${packages} dos2unix"
packages="${packages} doxygen"
packages="${packages} emacs"
# packages="${packages} emscripten"
packages="${packages} enscript"
packages="${packages} gcc"
packages="${packages} gcc@6"
packages="${packages} gcc@7"
packages="${packages} gcc@8"
packages="${packages} gcc@9"
packages="${packages} gcc@10"
packages="${packages} gcc@11"
packages="${packages} gcc@12"
packages="${packages} gcc-arm-none-eabi"
packages="${packages} gcc-avr"
packages="${packages} gdb"
packages="${packages} gem-completion"
packages="${packages} gh"
packages="${packages} git"
packages="${packages} git-lfs"
packages="${packages} git-test"
# packages="${packages} gitfs"
packages="${packages} glew"
packages="${packages} glfw3"
packages="${packages} glm"
packages="${packages} global"
packages="${packages} glslang"
packages="${packages} gnu-typist"
packages="${packages} gnuplot"
packages="${packages} go"
packages="${packages} gpg"
packages="${packages} graphviz"
packages="${packages} guile"
packages="${packages} hadolint"
packages="${packages} highlight"
packages="${packages} htop-osx"
# packages="${packages} httping"
# packages="${packages} httpry"
packages="${packages} iperf"
# packages="${packages} ipv6calc"
packages="${packages} jam"
packages="${packages} java"
packages="${packages} jq"
packages="${packages} julia"
packages="${packages} launchctl-completion"
# packages="${packages} legit"
packages="${packages} llvm"
packages="${packages} llvm@7"
packages="${packages} llvm@8"
packages="${packages} llvm@9"
# packages="${packages} llvm@10"
packages="${packages} llvm@11"
packages="${packages} llvm@12"
packages="${packages} lua"
packages="${packages} luarocks"
packages="${packages} maven"
packages="${packages} maven-completion"
packages="${packages} mit-scheme"
# packages="${packages} mscgen"
packages="${packages} netcat"
# packages="${packages} netperf"
packages="${packages} nmap"
packages="${packages} node"
packages="${packages} nuttcp"
packages="${packages} open-completion"
packages="${packages} openjdk"
packages="${packages} openssh"
packages="${packages} p0f"
packages="${packages} p7zip"
packages="${packages} pandoc"
# packages="${packages} parallel"
packages="${packages} pinentry"
packages="${packages} pip-completion"
packages="${packages} pkg-config"
packages="${packages} python3"
packages="${packages} qemu"
# packages="${packages} rsync"
packages="${packages} ruby"
packages="${packages} ruby-completion"
packages="${packages} rust"
packages="${packages} rustc-completion"
packages="${packages} shellcheck"
packages="${packages} socat"
packages="${packages} sqlite"
# packages="${packages} srecord"
packages="${packages} ssh-copy-id"
packages="${packages} standardese"
packages="${packages} stdman"
packages="${packages} stow"
packages="${packages} swig"
packages="${packages} tcpdump"
# packages="${packages} tcpflow"
# packages="${packages} tcping"
# packages="${packages} tcpreplay"
# packages="${packages} tcptrace"
# packages="${packages} tcptraceroute"
# packages="${packages} tcptrack"
packages="${packages} terraform"
packages="${packages} tig"
packages="${packages} tmux"
packages="${packages} v8"
packages="${packages} vault"
# packages="${packages} vegeta"
# packages="${packages} vim"
packages="${packages} wget"
# packages="${packages} xctool"
packages="${packages} xmlformat"
packages="${packages} xmlstarlet"
packages="${packages} xmlto"
packages="${packages} xquartz"
packages="${packages} zsh-completions"
${pm_install} ${packages}
# cleanup
${pm_autoremove}
${pm_cleanup}