From e0d01e3746ed8052ef6ebe060b3f1e8ec98e3b76 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 26 Jan 2013 11:18:10 -0200 Subject: Cleanup, variable scoping and styling --- templates/distributions.erb | 24 ++++++++++++------------ templates/index.html.erb | 8 ++++---- templates/uploaders.erb | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'templates') diff --git a/templates/distributions.erb b/templates/distributions.erb index 62d6502..233e5b6 100644 --- a/templates/distributions.erb +++ b/templates/distributions.erb @@ -1,11 +1,11 @@ -Origin: <%= reprepro_origin %> -Label: <%= reprepro_origin %> +Origin: <%= @origin %> +Label: <%= @origin %> Suite: reallyoldstable Codename: etch Version: 3.0 Architectures: i386 amd64 source kfreebsd-amd64 kfreebsd-i386 Components: main non-free contrib -Description: <%= reprepro_origin %> specific (or backported) packages +Description: <%= @origin %> specific (or backported) packages SignWith: yes Uploaders: uploaders DebIndices: Packages Release . .gz .bz2 @@ -13,15 +13,15 @@ UDebIndices: Packages . .gz .bz2 DscIndices: Sources Release .gz .bz2 Contents: . .gz .bz2 -Origin: <%= reprepro_origin %> -Label: <%= reprepro_origin %> +Origin: <%= @origin %> +Label: <%= @origin %> Suite: oldstable Pull: stable Codename: lenny Version: 5.0 Architectures: i386 amd64 source kfreebsd-amd64 kfreebsd-i386 Components: main non-free contrib -Description: <%= reprepro_origin %> specific (or backported) packages +Description: <%= @origin %> specific (or backported) packages SignWith: yes Uploaders: uploaders DebIndices: Packages Release . .gz .bz2 @@ -29,8 +29,8 @@ UDebIndices: Packages . .gz .bz2 DscIndices: Sources Release .gz .bz2 Contents: . .gz .bz2 -Origin: <%= reprepro_origin %> -Label: <%= reprepro_origin %> +Origin: <%= @origin %> +Label: <%= @origin %> Suite: stable Pull: testing Codename: squeeze @@ -52,7 +52,7 @@ Pull: unstable Codename: wheezy Architectures: i386 amd64 source kfreebsd-amd64 kfreebsd-i386 Components: main non-free contrib -Description: <%= reprepro_origin %> specific (or backported) packages +Description: <%= @origin %> specific (or backported) packages SignWith: yes Uploaders: uploaders DebIndices: Packages Release . .gz .bz2 @@ -60,13 +60,13 @@ UDebIndices: Packages . .gz .bz2 DscIndices: Sources Release .gz .bz2 Contents: . .gz .bz2 -Origin: <%= reprepro_origin %> -Label: <%= reprepro_origin %> +Origin: <%= @origin %> +Label: <%= @origin %> Suite: unstable Codename: sid Architectures: i386 amd64 source kfreebsd-amd64 kfreebsd-i386 Components: main non-free contrib -Description: <%= reprepro_origin %> specific (or backported) packages +Description: <%= @origin %> specific (or backported) packages SignWith: yes Uploaders: uploaders DebIndices: Packages Release . .gz .bz2 diff --git a/templates/index.html.erb b/templates/index.html.erb index ed077e9..ddc42bc 100644 --- a/templates/index.html.erb +++ b/templates/index.html.erb @@ -5,7 +5,7 @@

Introduction

-

This is the Debian package repository of <%= reprepro_origin %>. It is used for internal +

This is the Debian package repository of <%= @origin %>. It is used for internal distribution of locally built packages not yet part of Debian. Feel free to use it for yourself, but it comes at no warranty. @@ -14,8 +14,8 @@ it for yourself, but it comes at no warranty.

In your /etc/apt/sources.list:

-deb http://debian.<%= domain %>/debian squeeze main
-deb-src http://debian.<%= domain %>/debian squeeze main
+deb http://debian.<%= scope.lookupvar('::domain') %>/debian squeeze main
+deb-src http://debian.<%= scope.lookupvar('::domain') %>/debian squeeze main
 
"squeeze", of course, can be replaced by your distribution. @@ -30,7 +30,7 @@ more precise).

The key of the archive is in the key.asc file. You should add the key using something like this:

-wget http://debian.<%= domain %>/debian/key.asc
+wget http://debian.<%= scope.lookupvar('::domain') %>/debian/key.asc
 apt-key add key.asc
 apt-get update
 
diff --git a/templates/uploaders.erb b/templates/uploaders.erb index ce5897d..1f5414f 100644 --- a/templates/uploaders.erb +++ b/templates/uploaders.erb @@ -1,4 +1,4 @@ # reprepro uploaders, file managed by puppet -<% reprepro_uploaders.each do |uploader| -%> +<% @uploaders.each do |uploader| -%> allow * by key <%= uploader %> <% end -%> -- cgit v1.2.3