nix-tools/bin/signpkg.in

41 lines
1.1 KiB
Text
Raw Normal View History

2014-10-04 00:46:40 +02:00
#!/bin/bash
2014-10-04 15:41:22 +02:00
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
2014-10-04 00:46:40 +02:00
2014-10-04 21:50:00 +02:00
# 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
# }
2014-10-04 00:46:40 +02:00
2014-10-04 21:50:00 +02:00
if [[ -r @libdir@/functions.sh ]];then
source @libdir@/functions.sh
fi
2014-10-04 00:46:40 +02:00
. /etc/makepkg.conf
if [ ! -e "$1" ]; then
2014-10-04 21:50:00 +02:00
error "Package '$1' does not exists!"
2014-10-04 00:46:40 +02:00
exit 1
fi
msg "Signing package '$1' with key ${GPGKEY}..."
gpg --detach-sign --use-agent -u "${GPGKEY}" "$1"