summaryrefslogtreecommitdiff
path: root/pages/linux/_via_packages.html.haml
blob: 727318f0f010a06cb8071f16eb0a08d524950a30 (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/debian #{@locals[:distro]} main" > /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/debian #{@locals[:distro]} main" > /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/debian #{@locals[:distro]} main"
      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/debian #{@locals[:distro]} main"

  %p.b= t :upgrade_os

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