From 8bb6499572fd1c1a05c033f85bc36b556d9ba629 Mon Sep 17 00:00:00 2001 From: Tails developers Date: Tue, 23 Oct 2012 15:08:45 +0200 Subject: Refer to variables using Ruby instance variables in templates This is the recommended way, as it prevents clashes with Ruby function names. --- templates/reprepro-export-key.sh.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'templates/reprepro-export-key.sh.erb') 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" -- cgit v1.2.3