manjaro-tools/bin/signfile.in

30 lines
824 B
Text
Raw Normal View History

2016-02-22 17:32:12 +01:00
#!/bin/bash
#
# 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.
version=@version@
LIBDIR='@libdir@'
[[ -r ${LIBDIR}/util-msg.sh ]] && source ${LIBDIR}/util-msg.sh
import ${LIBDIR}/util.sh
load_vars "$HOME/.makepkg.conf"
load_vars /etc/makepkg.conf
if [ ! -e "$1" ]; then
error "%s does not exist!" "$1"
2016-02-22 17:32:12 +01:00
exit 1
fi
msg2 "Signing [%s] with key %s" "${1##*/}" "${GPGKEY}..."
2016-02-22 17:32:12 +01:00
gpg --detach-sign --use-agent -u "${GPGKEY}" "$1"