Skip to content
10 changes: 8 additions & 2 deletions templates/package/content/debian.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
<div class="ui form">
<div class="field">
<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.debian.registry"}}</label>
<div class="markup"><pre class="code-block"><code>sudo curl <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/debian/repository.key"></origin-url> -o /etc/apt/keyrings/gitea-{{$.PackageDescriptor.Owner.Name}}.asc
echo "deb [signed-by=/etc/apt/keyrings/gitea-{{$.PackageDescriptor.Owner.Name}}.asc] <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/debian"></origin-url> $distribution $component" | sudo tee -a /etc/apt/sources.list.d/gitea.list
<div class="markup"><pre class="code-block"><code>{{ if gt (len .Distributions) 1 }}# please select one:
distribution="" # {{StringUtils.Join .Distributions ", "}}

{{end}}{{ if gt (len .Components) 1 }}# please select one:
component="" # {{StringUtils.Join .Components ", "}}

{{end}}sudo curl <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/debian/repository.key"></origin-url> -o /etc/apt/keyrings/gitea-{{$.PackageDescriptor.Owner.Name}}.asc
echo "deb [signed-by=/etc/apt/keyrings/gitea-{{$.PackageDescriptor.Owner.Name}}.asc] <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/debian"></origin-url> {{ if eq (len .Distributions) 1 }}{{ index .Distributions 0 }}{{else}}$distribution{{end}} {{ if eq (len .Components) 1 }}{{ index .Components 0 }}{{else}}$component{{end}}" | sudo tee -a /etc/apt/sources.list.d/gitea.list
sudo apt update</code></pre></div>
<p>{{ctx.Locale.Tr "packages.debian.registry.info"}}</p>
</div>
Expand Down
Loading