From c981701a30e4f6359663af174b576c3a65c887ff Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 2 Dec 2020 18:53:31 +0100 Subject: [PATCH] _includes/apt-add.html: Add code for fish shell if dist should be "calculated" :) --- _includes/apt-add.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/_includes/apt-add.html b/_includes/apt-add.html index d896ecf..6bd5b42 100644 --- a/_includes/apt-add.html +++ b/_includes/apt-add.html @@ -1,6 +1,14 @@ {% assign apt-add_domain = include.domain | default: site.apt.domain %} -{% assign apt-add_dist = include.distribution | default: "`lsb_release -cs`" %} +{% assign apt-add_dist = include.distribution | default: "[[DEFAULT]]" %} + {% highlight bash %} -$ sudo apt-add-repository -y 'deb [arch=amd64] https://{{ apt-add_domain }}/{{ include.repo }} {{ apt-add_dist }} {{ include.components }}' {% if include.update == true %} +{% 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 %} $ sudo apt-get update{% endif %} {% endhighlight %}