diff options
author | Tails developers <tails@boum.org> | 2012-11-03 18:31:28 +0100 |
---|---|---|
committer | Tails developers <tails@boum.org> | 2012-11-03 18:36:23 +0100 |
commit | cca11e871c9d1d1a118e688d107cb27e9e197567 (patch) | |
tree | f1e614be2aeadb6413e91176cd859372db183f4f /templates/reprepro-export-key.sh.erb | |
parent | 657f79d39b5dfc0d01ea3d22a3587c9cc782c16b (diff) |
Create temp file in the same directory as the file it'll replace to get an atomic update in export-key
Diffstat (limited to 'templates/reprepro-export-key.sh.erb')
-rw-r--r-- | templates/reprepro-export-key.sh.erb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/reprepro-export-key.sh.erb b/templates/reprepro-export-key.sh.erb index 2b25df2..7b3c2ed 100644 --- a/templates/reprepro-export-key.sh.erb +++ b/templates/reprepro-export-key.sh.erb @@ -6,7 +6,7 @@ KEY="$(gpg --homedir '<%= @basedir %>/.gnupg' --with-colon --list-secret-keys | cut -d : -f 5 | head -n 1)" if [ -n "$KEY" ]; then - TEMPFILE=$(mktemp) + TEMPFILE=$(mktemp --tmpdir='<%= @basedir %>') trap "rm -f '$TEMPFILE'" EXIT DESTFILE='<%= @basedir %>/key.asc' gpg --homedir '<%= @basedir %>/.gnupg' --export --armor "$KEY" > "$TEMPFILE" |