blob: ab27d8eda94079acf18d9bfb70a35eee3e473a46 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
post_install() {
set -e
# Add icons to the system icons
XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`"
if [ ! -x "$XDG_ICON_RESOURCE" ]; then
echo "Error: Could not find xdg-icon-resource" >&2
exit 1
fi
for icon in "/opt/yandex/browser-beta/product_logo_"*.png; do
size="${icon##*/product_logo_}"
"$XDG_ICON_RESOURCE" install --size "${size%.png}" "$icon" "yandex-browser-beta"
done
UPDATE_MENUS="`which update-menus 2> /dev/null || true`"
if [ -x "$UPDATE_MENUS" ]; then
update-menus
fi
# Update cache of .desktop file MIME types. Non-fatal since it's just a cache.
update-desktop-database > /dev/null 2>&1 || true
chmod 4755 /opt/yandex/browser-beta/yandex_browser-sandbox
#chown root:root /opt/yandex/browser-beta/yandex_browser-sandbox
cat << EOF
==> NOTE: After install run chmod 4755 /opt/yandex/browser-beta/yandex_browser-sandbox as root.
EOF
}
post_upgrade() {
set -e
# Add icons to the system icons
XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`"
if [ ! -x "$XDG_ICON_RESOURCE" ]; then
echo "Error: Could not find xdg-icon-resource" >&2
exit 1
fi
for icon in "/opt/yandex/browser-beta/product_logo_"*.png; do
size="${icon##*/product_logo_}"
"$XDG_ICON_RESOURCE" install --size "${size%.png}" "$icon" "yandex-browser-beta"
done
UPDATE_MENUS="`which update-menus 2> /dev/null || true`"
if [ -x "$UPDATE_MENUS" ]; then
update-menus
fi
# Update cache of .desktop file MIME types. Non-fatal since it's just a cache.
update-desktop-database > /dev/null 2>&1 || true
chmod 4755 /opt/yandex/browser-beta/yandex_browser-sandbox
#chown root:root /opt/yandex/browser-beta/yandex_browser-sandbox
cat << EOF
==> NOTE: After install run chmod 4755 /opt/yandex/browser-beta/yandex_browser-sandbox as root.
EOF
}
|