summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorTails developers <tails@boum.org>2012-10-23 15:08:45 +0200
committerintrigeri <intrigeri@boum.org>2012-10-23 21:51:04 +0200
commit8bb6499572fd1c1a05c033f85bc36b556d9ba629 (patch)
treea8713f0b9aa56883f8645db222394aa549175954 /templates
parent236ae8bf9adfc3ad34650d20a82f9720a7002b1b (diff)
Refer to variables using Ruby instance variables in templates
This is the recommended way, as it prevents clashes with Ruby function names.
Diffstat (limited to 'templates')
-rw-r--r--templates/distributions.erb30
-rw-r--r--templates/index.html.erb10
-rw-r--r--templates/inoticoming.default.erb4
-rw-r--r--templates/reprepro-export-key.sh.erb6
-rw-r--r--templates/uploaders.erb2
5 files changed, 26 insertions, 26 deletions
diff --git a/templates/distributions.erb b/templates/distributions.erb
index 233f2b9..8ec9883 100644
--- a/templates/distributions.erb
+++ b/templates/distributions.erb
@@ -1,55 +1,55 @@
-Origin: <%= reprepro_origin %>
-Label: <%= reprepro_origin %>
+Origin: <%= @reprepro_origin %>
+Label: <%= @reprepro_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: <%= @reprepro_origin %> specific (or backported) packages
SignWith: yes
Uploaders: uploaders
-Origin: <%= reprepro_origin %>
-Label: <%= reprepro_origin %>
+Origin: <%= @reprepro_origin %>
+Label: <%= @reprepro_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: <%= @reprepro_origin %> specific (or backported) packages
SignWith: yes
Uploaders: uploaders
-Origin: <%= reprepro_origin %>
-Label: <%= reprepro_origin %>
+Origin: <%= @reprepro_origin %>
+Label: <%= @reprepro_origin %>
Suite: stable
Pull: testing
Codename: squeeze
Version: 6.0
Architectures: i386 amd64 source kfreebsd-amd64 kfreebsd-i386
Components: main non-free contrib
-Description: <%= reprepro_origin %> specific (or backported) packages
+Description: <%= @reprepro_origin %> specific (or backported) packages
SignWith: yes
Uploaders: uploaders
-Origin: <%= reprepro_origin %>
-Label: <%= reprepro_origin %>
+Origin: <%= @reprepro_origin %>
+Label: <%= @reprepro_origin %>
Suite: testing
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: <%= @reprepro_origin %> specific (or backported) packages
SignWith: yes
Uploaders: uploaders
-Origin: <%= reprepro_origin %>
-Label: <%= reprepro_origin %>
+Origin: <%= @reprepro_origin %>
+Label: <%= @reprepro_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: <%= @reprepro_origin %> specific (or backported) packages
SignWith: yes
Uploaders: uploaders-sid
diff --git a/templates/index.html.erb b/templates/index.html.erb
index 65ac222..1173021 100644
--- a/templates/index.html.erb
+++ b/templates/index.html.erb
@@ -1,11 +1,11 @@
<html>
<head>
-<title><%= domain %> Debian package repository</title>
+<title><%= @domain %> Debian package repository</title>
</head>
<body>
<h1>Introduction</h1>
-<p>This is the Debian package repository of <%= reprepro_origin %>. It is used for internal
+<p>This is the Debian package repository of <%= @reprepro_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.
<p>In your /etc/apt/source.list:
<pre>
-deb http://debian.<%= domain %>/debian lenny main
-deb-src http://debian.<%= domain %>/debian lenny main
+deb http://debian.<%= @domain %>/debian lenny main
+deb-src http://debian.<%= @domain %>/debian lenny main
</pre>
"lenny", of course, can be replaced by your distribution. Know that we usually
@@ -31,7 +31,7 @@ more precise).</p>
<p>The key of the archive is in the <a href="/key.asc">key.asc file</a>. You should add the key using something like this:</p>
<pre>
-wget http://debian.<%= domain %>/debian/key.asc
+wget http://debian.<%= @domain %>/debian/key.asc
apt-key add key.asc
apt-get update
</pre>
diff --git a/templates/inoticoming.default.erb b/templates/inoticoming.default.erb
index b666851..303d9fc 100644
--- a/templates/inoticoming.default.erb
+++ b/templates/inoticoming.default.erb
@@ -14,9 +14,9 @@ LOGFILE="/var/log/incoming.log"
INITIALSEARCH=0
# directory to monitor
-DIR=<%= basedir %>/incoming
+DIR=<%= @basedir %>/incoming
# actions
-BASEDIR=<%= basedir %>
+BASEDIR=<%= @basedir %>
RULENAME=incoming
ACTIONS="--suffix .changes --stderr-to-log reprepro -s -b $BASEDIR --waitforlock 1000 processincoming $RULENAME {} ;"
diff --git a/templates/reprepro-export-key.sh.erb b/templates/reprepro-export-key.sh.erb
index 2b97585..eee1731 100644
--- a/templates/reprepro-export-key.sh.erb
+++ b/templates/reprepro-export-key.sh.erb
@@ -1,11 +1,11 @@
#!/bin/bash
-KEY="`gpg --homedir <%= basedir %>/.gnupg --with-colon --list-secret-keys | cut -d : -f 5 | head -n 1`"
+KEY="`gpg --homedir <%= @basedir %>/.gnupg --with-colon --list-secret-keys | cut -d : -f 5 | head -n 1`"
if [ ! -z "$KEY" ]; then
tempfile=$(mktemp)
- destfile=<%= basedir %>/key.asc
- gpg --homedir <%= basedir %>/.gnupg --export --armor $KEY > "$tempfile"
+ destfile=<%= @basedir %>/key.asc
+ gpg --homedir <%= @basedir %>/.gnupg --export --armor $KEY > "$tempfile"
mv "$tempfile" "$destfile"
chown reprepro:reprepro "$destfile"
chmod 0664 "$destfile"
diff --git a/templates/uploaders.erb b/templates/uploaders.erb
index ce5897d..d962b55 100644
--- a/templates/uploaders.erb
+++ b/templates/uploaders.erb
@@ -1,4 +1,4 @@
# reprepro uploaders, file managed by puppet
-<% reprepro_uploaders.each do |uploader| -%>
+<% @reprepro_uploaders.each do |uploader| -%>
allow * by key <%= uploader %>
<% end -%>