blob: a60e94e2fe9187a540c47f0a451c56894bf65ab2 (
plain)
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
|
#!/bin/sh
set -e
step() {
echo -e '\e[1;34m==========' "$@" '==========\e[0m'
}
run() {
"$@" || {
echo -ne "\e[1;31mContinue?\e[0m "
read
}
}
#################################################################################
if [ "$(equery -q l -I -o sys-apps/portage)" != "$(equery -q l sys-apps/portage)" ]; then
step "Update portage"
run emerge -1 sys-apps/portage
fi
step "Update packages"
run emerge -auDU --with-bdeps=y --keep-going @world "$@"
step "Rebuil packages"
run revdep-rebuild -- "$@"
step "Rebuild preserved ones"
run emerge --keep-going=y @preserved-rebuild
step "Clean packages"
run emerge --depclean -a "$@"
if eselect modules has fontconfig; then
step "Enable all fonts"
enable_all_fonts() {
eselect fontconfig list | \
awk 'NR > 1 && $3 != "*" { print substr($1,2,length($1)-2) }' | \
while read -r font; do
eselect fontconfig enable "$font"
done
}
enable_all_fonts
fi
|