manjaro-tools/bin/signfile.in

30 lines
834 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@'
import ${LIBDIR}/util.sh
load_user_info
load_vars "${PAC_USERCONFDIR}/makepkg.conf" || load_vars "$USER_HOME/.makepkg.conf"
2016-02-22 17:32:12 +01:00
load_vars /etc/makepkg.conf
if [ ! -e "$1" ]; then
2016-09-15 23:58:18 +02:00
error "%s does not exist!" "$1"
exit 1
2016-02-22 17:32:12 +01:00
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"