From 24c3b0652db997e13d87a2bae81ad94af02d173d Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 28 Dec 2020 13:14:37 +0100 Subject: [PATCH] _includes/apt-add.html: split into distinct code blocks --- _includes/apt-add.html | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/_includes/apt-add.html b/_includes/apt-add.html index 6bd5b42..2afd98f 100644 --- a/_includes/apt-add.html +++ b/_includes/apt-add.html @@ -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 %}