Skip to content

Commit 2ed525a

Browse files
committed
Make debian package setup example more self explained
1 parent b907b9f commit 2ed525a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

templates/package/content/debian.tmpl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44
<div class="ui form">
55
<div class="field">
66
<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.debian.registry"}}</label>
7-
<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
8-
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
7+
<div class="markup"><pre class="code-block"><code>{{ if gt (len .Distributions) 1 }}# please select one:
8+
distribution="" # {{StringUtils.Join .Distributions ", "}}
9+
10+
{{end}}{{ if gt (len .Components) 1 }}# please select one:
11+
component="" # {{StringUtils.Join .Components ", "}}
12+
13+
{{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
14+
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
915
sudo apt update</code></pre></div>
1016
<p>{{ctx.Locale.Tr "packages.debian.registry.info"}}</p>
1117
</div>

0 commit comments

Comments
 (0)