1#!/bin/bash 2if [ $# -lt 1 ]; then 3 echo "usage $0 <ssl-key> [<param> ...]" 4 exit 1; 5fi 6key=${1} 7shift 8params=${@} 9 10#validate key 11keystatus=$(gpg --list-keys | grep ${key} | awk '{print $1}') 12if [ "${keystatus}" != "pub" ]; then 13 echo "Could not find public key with label ${key}" 14 echo -n "Available keys from: " 15 gpg --list-keys | grep --invert-match '^sub' 16 17 exit 1 18fi 19 20mvn ${params} clean site:jar -P sonatype-oss-release -Dgpg.keyname=${key} deploy 21