aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-pack_z_block
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2023-08-18 22:30:19 +0300
committerkaotisk <kaotisk@arching-kaos.org>2023-08-18 22:30:19 +0300
commitda5c4e118f6d5b04ee31ca2374a1bd8aa8c00e37 (patch)
treec9f425479a45e5f91f29d23b7207e2b662b4cd2f /bin/ak-pack_z_block
parent39ed9fd836004d44bc31ecb4a63376a3c2087da6 (diff)
downloadarching-kaos-tools-da5c4e118f6d5b04ee31ca2374a1bd8aa8c00e37.tar.gz
arching-kaos-tools-da5c4e118f6d5b04ee31ca2374a1bd8aa8c00e37.tar.bz2
arching-kaos-tools-da5c4e118f6d5b04ee31ca2374a1bd8aa8c00e37.zip
Moved GPG keyring to dedicated folder under .arching-kaos/
Diffstat (limited to 'bin/ak-pack_z_block')
-rwxr-xr-xbin/ak-pack_z_block8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/ak-pack_z_block b/bin/ak-pack_z_block
index 63f4a4e..4c3ae16 100755
--- a/bin/ak-pack_z_block
+++ b/bin/ak-pack_z_block
@@ -12,7 +12,7 @@
#AK_FINGERPRINT="CHANGE THIS TO YOUR DEFAULT AK_FINGERPRINT"
# We acquire the GPG fingerprint by email address
# The following example finds kaos@kaos.kaos' GPG fingerprint like this
-# AK_FINGERPRINT="$(gpg2 --list-keys | grep kaos@kaos.kaos -1 | head -n1 | awk '{print $1}')"
+# AK_FINGERPRINT="$(gpg2 --homedir $AK_GPGHOME --list-keys | grep kaos@kaos.kaos -1 | head -n1 | awk '{print $1}')"
PROGRAM="$(basename $0)"
set -xe
@@ -60,14 +60,14 @@ main(){
# We create a detached and armor signature of it
MESSAGE_SIGN_FILE=$MESSAGE".asc"
- gpg2 --detach-sign --sign-with $AK_FINGERPRINT --armor --output $MESSAGE_SIGN_FILE $MESSAGE
+ gpg2 --homedir $AK_GPGHOME --detach-sign --sign-with $AK_FINGERPRINT --armor --output $MESSAGE_SIGN_FILE $MESSAGE
# We add the signature to IPFS
MESSAGE_SIGNATURE=$(ak-ipfs-add $MESSAGE_SIGN_FILE)
# We will be using our public key also to put it in the block later
KEY="gpg.pub"
- gpg2 --armour --output $KEY --export $AK_FINGERPRINT
+ gpg2 --homedir $AK_GPGHOME --armour --output $KEY --export $AK_FINGERPRINT
GPG_PUB_KEY=$(ak-ipfs-add $KEY)
# Acquire last block of information, to chain this one with previous posted
@@ -78,7 +78,7 @@ main(){
BLOCK="block"
BLOCK_SIG=$BLOCK".asc"
# We have a block now, so we sign it
- gpg2 --detach-sign --sign-with $AK_FINGERPRINT --armor --output $BLOCK_SIG $BLOCK
+ gpg2 --homedir $AK_GPGHOME --detach-sign --sign-with $AK_FINGERPRINT --armor --output $BLOCK_SIG $BLOCK
# We now add the signature to IPFS
BLOCK_SIGNATURE=$(ak-ipfs-add $BLOCK_SIG)