pkgkit: copy public key to ~/.abuild

This commit is contained in:
Drew DeVault 2022-10-19 10:22:06 +02:00
parent b9e8e12432
commit ef6cdaf72f
1 changed files with 3 additions and 1 deletions

4
pkgkit
View File

@ -93,8 +93,10 @@ add_repo() {
openssl genrsa -out "$key" 2048
)
fi
pkey="$(basename "$key").pub"
sudo openssl rsa -in $key -pubout \
-out /etc/apk/keys/$(basename "$key").pub
-out /etc/apk/keys/"$pkey"
cp /etc/apk/keys/"$pkey" ~/.abuild/"$pkey"
if [ $set_default -eq 1 ]
then
echo "PACKAGER_PRIVKEY="'"'$key'"' >> \