2017-01-23 08:09:18 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-09-23 05:00:18 -05:00
|
|
|
set -e
|
2017-01-23 08:09:18 -06:00
|
|
|
|
2019-09-23 05:00:18 -05:00
|
|
|
_files=$*
|
|
|
|
|
|
|
|
if [ -z "$_files" ]; then
|
|
|
|
echo "_files (arg 1) has to be set"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$GPG_KEY_PASSWORD" ]; then
|
|
|
|
echo "GPG_KEY_PASSWORD has to be set"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2019-11-18 11:50:47 -06:00
|
|
|
gpg --batch --allow-secret-key-import --import ~/private-repo/signing/private.key
|
2017-01-23 08:09:18 -06:00
|
|
|
|
2017-01-24 09:14:01 -06:00
|
|
|
cp ./scripts/build/rpmmacros ~/.rpmmacros
|
2019-11-18 14:23:32 -06:00
|
|
|
echo "$GPG_KEY_PASSWORD" > /tmp/gpg-passphrase
|
2017-01-23 08:09:18 -06:00
|
|
|
|
2019-09-23 05:00:18 -05:00
|
|
|
for package in $_files; do
|
2018-06-20 12:01:15 -05:00
|
|
|
[ -e "$package" ] || continue
|
2019-11-18 14:23:32 -06:00
|
|
|
rpm --addsign "$package"
|
2018-06-20 12:01:15 -05:00
|
|
|
done
|