From 3a8c3d4a7c1bb570156a75195529b96d4944eb50 Mon Sep 17 00:00:00 2001 From: meliurwen Date: Thu, 20 May 2021 00:14:37 +0200 Subject: [PATCH] Added public key publishing --- build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 737b63f..c6f44cc 100755 --- a/build.sh +++ b/build.sh @@ -99,8 +99,15 @@ if [ -z ${GPG_SUBKEY_ID+x} ]; then GPG_SUBKEY_ID="$(gpg --list-secret-key --with-subkey-fingerprint --with-colons | awk -F: '$1 == "fpr" {print $10;}' | sed -n '2 p')" fi +if [ ! -f repo/KEY.pub ];then + echo "Public key not published. Generating and publishing it..." + gpg --armor --export "${GPG_SUBKEY_ID}" > repo/KEY.pub +fi + echo "Signing the repo..." -gpg --passphrase-file keys/passphrase --pinentry-mode loopback --default-key $GPG_SUBKEY_ID -abs -o - repo/Release > repo/Release.gpg -gpg --passphrase-file keys/passphrase --pinentry-mode loopback --default-key $GPG_SUBKEY_ID --clearsign -o - repo/Release > repo/InRelease +gpg --passphrase-file keys/passphrase --pinentry-mode loopback --default-key "${GPG_SUBKEY_ID}" -abs -o - repo/Release > repo/Release.gpg +gpg --passphrase-file keys/passphrase --pinentry-mode loopback --default-key "${GPG_SUBKEY_ID}" --clearsign -o - repo/Release > repo/InRelease echo "Done." +#echo "deb file:/repo /" > /etc/apt/sources.list.d/custom-repo.list +