#!/bin/bash function usage(){ echo "bash install-key UserName Email TimeToExpireInSecondsFromCurrentTime PhassPhrase" exit 0 } if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" ];then usage fi name="$1" email="$2" expdate="$3" phassphrase="$4" cat >gen-key-script < "${pub_key_path}/mockgui-gpg-key" cat >~/.rpmmacros < %_gpgbin /usr/bin/gpg EOF echo "${phassphrase}" > ../keys/save