summaryrefslogtreecommitdiff
path: root/pages/install/linux/_via_packages.html.haml
blob: e1367acb404b5555384364fef2411bf3f75a64ff (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
64
65
66
67
68
- if @locals[:os] == 'debian'

  %p.b= t :to_install

  %pre
    - if @locals[:backport] == 'true'
      Follow [[instructions for activating Debian Backports => https://backports.debian.org/Instructions]].
      sudo -s
      apt install -t #{@locals[:distro]}-backports leap-archive-keyring
      \
    - else
      sudo -s
      apt install leap-archive-keyring
    :preserve
      echo "deb http://deb.bitmask.net/client #{@locals[:distro]} release" > /etc/apt/sources.list.d/bitmask.list
      apt update
      apt install bitmask

  %p.b= t :to_remove

  %pre
    :preserve
      sudo -s
      apt remove bitmask leap-archive-keyring
      rm /etc/apt/sources.list.d/bitmask.list

  %p.b= t :upgrade_os

  %pre
    :preserve
      sudo -s
      echo "deb http://deb.bitmask.net/client #{@locals[:distro]} release" > /etc/apt/sources.list.d/bitmask.list
      apt update
      apt upgrade

- else

  - prior = {"xenial" => "wily", "wily" => "vivid", "vivid" => "utopic"}

  %p.b= t :to_install

  %pre
    :preserve
      sudo -s
      add-apt-repository "deb http://deb.bitmask.net/client #{@locals[:distro]} release"
      wget -O- https://dl.bitmask.net/apt.key | apt-key add -
      apt update
      apt install bitmask leap-archive-keyring

  %p.b= t :to_remove

  %pre
    :preserve
      sudo -s
      apt remove bitmask leap-archive-keyring
      apt-key del 0x1E34A1828E207901
      add-apt-repository --remove "deb http://deb.bitmask.net/client #{@locals[:distro]} release"

  %p.b= t :upgrade_os

  %pre
    :preserve
      sudo -s
      add-apt-repository --remove "deb http://deb.bitmask.net/client #{prior[@locals[:distro]]} release"
      add-apt-repository "deb http://deb.bitmask.net/client #{@locals[:distro]} release"
      apt update
      apt upgrade