diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-05-09 00:47:38 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-05-09 00:47:38 -0300 |
commit | 5d92c6169661a5833bdc73df738e1a6a36840f23 (patch) | |
tree | b570d16495c6f9377b8b25ada46374d8beb9d193 /templates/reprepro-export-key.sh.erb | |
parent | 5d29b8b6b4ff6fb1ebc0b0e6b853dcfffd7a049e (diff) | |
download | puppet-reprepro-5d92c6169661a5833bdc73df738e1a6a36840f23.tar.gz puppet-reprepro-5d92c6169661a5833bdc73df738e1a6a36840f23.tar.bz2 |
Checking if there's a key to export
Diffstat (limited to 'templates/reprepro-export-key.sh.erb')
-rw-r--r-- | templates/reprepro-export-key.sh.erb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/templates/reprepro-export-key.sh.erb b/templates/reprepro-export-key.sh.erb index e547408..ecd2cf2 100644 --- a/templates/reprepro-export-key.sh.erb +++ b/templates/reprepro-export-key.sh.erb @@ -1,4 +1,7 @@ #!/bin/bash KEY="`/usr/bin/gpg --with-colon --list-secret-keys | cut -d : -f 5 | head -1`" -/usr/bin/gpg --export -a $KEY > <%= basedir %>/key.asc + +if [ ! -z "$KEY" ]; then + /usr/bin/gpg --export --armor $KEY > <%= basedir %>/key.asc +fi |