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 +