-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkonfig.sh
More file actions
260 lines (237 loc) · 6.39 KB
/
Copy pathkonfig.sh
File metadata and controls
260 lines (237 loc) · 6.39 KB
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
#!/bin/bash
# shellcheck disable=SC1091 disable=SC2034
# This script contains variables, functions, and tests used by the other scripts.
# --- Color and formatting ---
green_bright="\e[1;38;5;118m"
magenta_bright="\e[1;38;5;201m"
orange_bright="\e[1;38;5;208m"
yellow_bright="\e[1;38;5;226m"
blue_bright="\e[1;38;5;74m"
red_bright="\e[1;38;5;1m"
green_dim="\e[2;38;5;118m"
magenta_dim="\e[2;38;5;201m"
orange_dim="\e[2;38;5;208m"
red_dim="\e[2;38;5;1m"
bold="\e[1m"
italic="\e[3m"
off="\e[0m"
# --- Paths and aliases ---
dldir=$(xdg-user-dir DOWNLOAD)
docdir=$(xdg-user-dir DOCUMENTS)
scrfldr=$HOME/.equivoke
rebasef="git config pull.rebase false"
snin="sudo ninja -C build install"
distro=$(lsb_release -sc)
mson=1.10.1-1ubuntu2_all
# --- Build dependencies, recommended and script-related packages ---
deps=(
arc-theme
build-essential
ccache
check
cmake
cowsay
ddcutil
doxygen
fonts-noto
freeglut3-dev
gettext
graphviz
gstreamer1.0-plugins-bad
gstreamer1.0-plugins-ugly
i2c-tools
imagemagick
libaom-dev
libasound2-dev
libavahi-client-dev
libavif-dev
libblkid-dev
libbluetooth-dev
libddcutil-dev
libegl1-mesa-dev
libexif-dev
libfontconfig-dev
libdrm-dev
libfreetype-dev
libfribidi-dev
libgbm-dev
libgeoclue-2-dev
libgif-dev
libgraphviz-dev
libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
libharfbuzz-dev
libheif-dev
libi2c-dev
libibus-1.0-dev
libinput-dev libinput-tools
libjansson-dev
libjpeg-dev
libjson-c-dev
libjxl-dev
libkmod-dev
liblua5.2-dev
liblz4-dev
libmenu-cache-dev
libmount-dev
libopenjp2-7-dev
libosmesa6-dev
libpam0g-dev
libpoppler-cpp-dev
libpoppler-dev
libpoppler-private-dev
libpulse-dev
libqoi-dev
libraw-dev
librlottie-dev
librsvg2-dev
libsdl1.2-dev
libscim-dev
libsndfile1-dev
libspectre-dev
libssl-dev
libsystemd-dev
libtiff-dev
libtool
libudev-dev
libudisks2-dev
libunibreak-dev
libunwind-dev
libusb-1.0-0-dev
libwebp-dev
libxcb-keysyms1-dev
libxcursor-dev
libxinerama-dev
libxkbcommon-x11-dev
libxkbfile-dev
lxmenu-data
libxrandr-dev
libxss-dev
libxtst-dev
libyuv-dev
lolcat
manpages-posix-dev
papirus-icon-theme
texlive-base
texlive-font-utils
unity-greeter-badges
valgrind
wayland-protocols
wmctrl
xdotool
)
# --- Source repositories of Enlightenment programs ---
clonefl="git clone https://git.enlightenment.org/enlightenment/efl.git"
clonety="git clone https://git.enlightenment.org/enlightenment/terminology.git"
clonenl="git clone https://git.enlightenment.org/enlightenment/enlightenment.git"
cloneph="git clone https://git.enlightenment.org/enlightenment/ephoto.git"
clonerg="git clone https://git.enlightenment.org/enlightenment/rage.git"
clonevi="git clone https://git.enlightenment.org/enlightenment/evisum.git"
clonexp="git clone https://git.enlightenment.org/enlightenment/express.git"
clonecr="git clone https://git.enlightenment.org/enlightenment/ecrire.git"
cloneve="git clone https://git.enlightenment.org/enlightenment/enventor.git"
clonedi="git clone https://git.enlightenment.org/enlightenment/edi.git"
clonent="git clone https://git.enlightenment.org/vtorri/entice.git"
cloneft="git clone https://git.enlightenment.org/enlightenment/enlightenment-module-forecasts.git"
clonepn="git clone https://git.enlightenment.org/enlightenment/enlightenment-module-penguins.git"
clonepl="git clone https://git.enlightenment.org/enlightenment/enlightenment-module-places.git"
clonete="git clone https://github.com/dimmus/eflete.git"
# --- Programs to be built using the Meson build system ---
prog_mbs=(
efl
terminology
enlightenment
ephoto
rage
evisum
express
ecrire
enventor
edi
entice
enlightenment-module-forecasts
enlightenment-module-penguins
enlightenment-module-places
eflete
)
# --- Audible feedback on most systems ---
beep_attention() {
aplay --quiet /usr/share/sounds/sound-icons/percussion-50.wav 2>/dev/null
}
beep_complete() {
aplay --quiet /usr/share/sounds/sound-icons/glass-water-1.wav 2>/dev/null
}
beep_exit() {
aplay --quiet /usr/share/sounds/sound-icons/pipe.wav 2>/dev/null
}
beep_ok() {
aplay --quiet /usr/share/sounds/sound-icons/trumpet-12.wav 2>/dev/null
}
beep_question() {
aplay --quiet /usr/share/sounds/sound-icons/guitar-13.wav 2>/dev/null
}
beep_warning() {
aplay --quiet /usr/share/sounds/sound-icons/cembalo-12.wav 2>/dev/null
}
# --- System checks ---
do_tests() {
if [ -x /usr/bin/wmctrl ]; then
if [ "$XDG_SESSION_TYPE" == "x11" ]; then
wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
fi
fi
printf "\n\n$bold%s $off%s\n" "System checks..."
if systemd-detect-virt -q --container; then
printf "\n$red_bright%s $off%s\n\n" "EQUIVOKE IS NOT INTENDED FOR USE INSIDE CONTAINERS."
beep_exit
exit 1
fi
if [ "$distro" == noble ]; then
printf "\n$green_bright%s $off%s\n\n" "Ubuntu ${distro^}... OK"
sleep 1
else
printf "\n$red_bright%s $off%s\n\n" "UNSUPPORTED OPERATING SYSTEM [ $(lsb_release -ds) ]."
beep_exit
exit 1
fi
if ! git ls-remote https://git.enlightenment.org/enlightenment/efl.git HEAD &>/dev/null; then
printf "\n$red_bright%s %s\n" "REMOTE HOST IS UNREACHABLE——TRY AGAIN LATER"
printf "$red_bright%s $off%s\n\n" "OR CHECK YOUR INTERNET CONNECTION."
beep_exit
exit 1
fi
if [[ ! -d "$HOME/.local/bin" ]]; then
mkdir -p "$HOME/.local/bin"
fi
if [[ ! -d "$HOME/.cache/ebuilds" ]]; then
mkdir -p "$HOME/.cache/ebuilds"
fi
}
# --- Create bash_aliases file ---
do_bsh_alias() {
if [ -f "$HOME/.bash_aliases" ]; then
mv -vb "$HOME/.bash_aliases" "$HOME/.bash_aliases_bak"
echo
touch "$HOME/.bash_aliases"
else
touch "$HOME/.bash_aliases"
fi
cat >"$HOME/.bash_aliases" <<EOF
# Compiler and linker flags added by KONFIG.SH
export CC="ccache gcc"
export CXX="ccache g++"
export USE_CCACHE=1
export CCACHE_COMPRESS=6
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig
# Keyring service workaround for Enlightenment.
# You also need to autostart some additional services at startup for this to work:
# See the repository's wiki (Startup Applications) for more info.
#
if printenv | grep -q 'XDG_CURRENT_DESKTOP=Enlightenment'; then
export SSH_AUTH_SOCK=/run/user/${UID}/keyring/ssh
fi
EOF
. "$HOME/.bash_aliases"
}