manjaro-tools/bin/signpkg
2014-10-04 08:27:55 +02:00

29 lines
543 B
Bash
Executable file

#!/bin/bash
err() {
ALL_OFF="\e[1;0m"
BOLD="\e[1;1m"
RED="${BOLD}\e[1;31m"
local mesg=$1; shift
printf "${RED}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
msg() {
ALL_OFF="\e[1;0m"
BOLD="\e[1;1m"
GREEN="${BOLD}\e[1;32m"
local mesg=$1; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
. /etc/makepkg.conf
if [ ! -e "$1" ]; then
err "Package '$1' does not exists!"
exit 1
fi
msg "Signing package '$1' with key ${GPGKEY}..."
gpg --detach-sign --use-agent -u "${GPGKEY}" "$1"