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
#!/bin/sh
PKGNAME=sputnik-browser-stable
SUPPORTEDARCHES="x86_64"
# discontinued
# https://bugzilla.altlinux.org/43495
#DESCRIPTION="Sputnik browser from the official site"
. $(dirname $0)/common.sh
URL="https://sputnik-lab.com/api-updates/updates/apps/meta?channel=b2c-distrs-on-site"
url_by_id_content()
{
local id_content="$1"
epm tool eget -q -O- "$URL" | grep -A6 "$id_content" | tail -n1 | sed -e 's|.*"url": "||' -e 's|".*||'
}
case "$(epm print info -e)" in
Ubuntu/20.04)
id_content='ubuntu20-id'
;;
Ubuntu/16.04)
id_content='ubuntu-id'
;;
Ubuntu/*)
id_content='ubuntu20-id'
;;
ALTLinux/c8)
id_content='alt-id'
;;
ALTLinux/*|ALTServer/*)
id_content='alt9-id'
;;
AstraLinux*)
id_content='astrase-id'
;;
RedOS/*)
id_content='redos-id'
;;
RosaLinux/*)
id_content='rosa-id'
;;
Windows/*)
id_content='win-id'
;;
*)
fatal "Unsupported system $(epm print info -e)"
;;
esac
epm install $(url_by_id_content "browser-b2c-$id_content")
ERR=$?
if [ "$ERR" = 0 ] ; then
echo "Running # /opt/sputnik-browser/sputnik_client --generate_branding to get license in config.dat"
esu /opt/sputnik-browser/sputnik_client --generate_branding
echo "Disable strange system service sputnik_client"
serv sputnik_client off
esu killall sputnik_client
fi
exit $ERR