1
0
Fork 0
mirror of https://github.com/eosswedenorg/apt synced 2026-06-17 04:40:03 +02:00

_includes/apt-add.html: split into distinct code blocks

This commit is contained in:
Henrik Hautakoski 2020-12-28 13:14:37 +01:00
parent 4190ee124f
commit 24c3b0652d

View file

@ -1,14 +1,21 @@
{% assign apt-add_domain = include.domain | default: site.apt.domain %}
{% assign apt-add_dist = include.distribution | default: "[[DEFAULT]]" %}
{% highlight bash %}
{% if include.distribution %}
$ sudo apt-add-repository -y 'deb [arch=amd64] https://{{ apt-add_domain }}/{{ include.repo }} {{ include.distribution }} {{ include.components }}'
{% else %}
# For Bash like shells.
$ sudo apt-add-repository -y 'deb [arch=amd64] https://{{ apt-add_domain }}/{{ include.repo }} `lsb_release -cs` {{ include.components }}'
# If you are using fish
$ sudo apt-add-repository -y 'deb [arch=amd64] https://{{ apt-add_domain }}/{{ include.repo }}' (lsb_release -cs) '{{ include.components }}'
{% endif %}{% if include.update == true %}
{% highlight bash %}
$ sudo apt-add-repository -y 'deb [arch=amd64] https://{{ apt-add_domain }}/{{ include.repo }} {{ include.distribution }} {{ include.components }}'{% if include.update == true %}
$ sudo apt-get update{% endif %}
{% endhighlight %}
{% else %}
{% highlight bash %}
# For Bash like shells.
$ sudo apt-add-repository -y 'deb [arch=amd64] https://{{ apt-add_domain }}/{{ include.repo }} `lsb_release -cs` {{ include.components }}'{% if include.update == true %}
$ sudo apt-get update{% endif %}
{% endhighlight %}
{% highlight bash %}
# If you are using fish
$ sudo apt-add-repository -y 'deb [arch=amd64] https://{{ apt-add_domain }}/{{ include.repo }}' (lsb_release -cs) '{{ include.components }}'{% if include.update == true %}
$ sudo apt-get update{% endif %}
{% endhighlight %}
{% endif %}