1 2 3 4 5 6 7
#!/bin/bash KEY="`/usr/bin/gpg --with-colon --list-secret-keys | cut -d : -f 5 | head -1`" if [ ! -z "$KEY" ]; then /usr/bin/gpg --export --armor $KEY > <%= basedir %>/key.asc fi