~dricottone/huttese-apk

56ea7f0ef754051e1bf3bd6b76a0e075d3086aa4 — Drew DeVault 4 years ago 95099db
pkgkit: generate new abuild keys if necessary
1 files changed, 8 insertions(+), 0 deletions(-)

M pkgkit
M pkgkit => pkgkit +8 -0
@@ 83,6 83,14 @@ add_repo() {
	mkdir -p ~/packages/$repo
	echo ~/packages/$repo | cat - /etc/apk/repositories > /tmp/repositories
	sudo mv /tmp/repositories /etc/apk/repositories
	if ! [ -f "$key" ]
	then
		echo "Warning: generating new abuild key"
		(
			umask 0007
			openssl genrsa -out "$key" 2048
		)
	fi
	sudo openssl rsa -in $key -pubout \
		-out /etc/apk/keys/$(basename "$key").pub
	if [ $set_default -eq 1 ]