diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 03017ce6746df..99d7ce3d4aefe 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3685,7 +3685,7 @@ container.labels.value = Value cran.registry = Set up this registry in your Rprofile.site file: cran.install = To install the package, run the following command: debian.registry = Set up this registry from the command line: -debian.registry.info = Choose $distribution and $component from the list below. +debian.registry.one_of_vars = Choose one of: debian.install = To install the package, run the following command: debian.repository = Repository Info debian.repository.distributions = Distributions diff --git a/templates/package/content/debian.tmpl b/templates/package/content/debian.tmpl index 73b82578357fd..15eff9e1589ca 100644 --- a/templates/package/content/debian.tmpl +++ b/templates/package/content/debian.tmpl @@ -4,10 +4,12 @@
-
sudo curl  -o /etc/apt/keyrings/gitea-{{$.PackageDescriptor.Owner.Name}}.asc
-echo "deb [signed-by=/etc/apt/keyrings/gitea-{{$.PackageDescriptor.Owner.Name}}.asc]  $distribution $component" | sudo tee -a /etc/apt/sources.list.d/gitea.list
+				
{{if gt (len .Distributions) 1}}DISTRIBUTION="" # {{ctx.Locale.Tr "packages.debian.registry.one_of_vars"}} {{StringUtils.Join .Distributions ", "}}
+{{end}}{{if gt (len .Components) 1}}COMPONENT="" # {{ctx.Locale.Tr "packages.debian.registry.one_of_vars"}} {{StringUtils.Join .Components ", "}}
+{{end}}{{if or (gt (len .Distributions) 1) (gt (len .Components) 1)}}
+{{end}}sudo curl  -o /etc/apt/keyrings/gitea-{{$.PackageDescriptor.Owner.Name}}.asc
+echo "deb [signed-by=/etc/apt/keyrings/gitea-{{$.PackageDescriptor.Owner.Name}}.asc]  {{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
-

{{ctx.Locale.Tr "packages.debian.registry.info"}}