From da5c4e118f6d5b04ee31ca2374a1bd8aa8c00e37 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Fri, 18 Aug 2023 22:30:19 +0300 Subject: Moved GPG keyring to dedicated folder under .arching-kaos/ --- bin/ak-articles | 2 +- bin/ak-categories | 2 +- bin/ak-comments | 2 +- bin/ak-config | 2 +- bin/ak-data-expand | 4 ++-- bin/ak-enter | 4 ++-- bin/ak-files | 2 +- bin/ak-mixtapes | 2 +- bin/ak-news | 4 ++-- bin/ak-pack_z_block | 8 ++++---- bin/ak-profile | 2 +- bin/ak-reference | 2 +- bin/ak-sm-files | 2 +- bin/ak-todos | 2 +- bin/ak-transactions | 2 +- bin/ak-zblock-manipulator | 8 ++++---- config.sh | 1 + install.sh | 1 + 18 files changed, 27 insertions(+), 25 deletions(-) diff --git a/bin/ak-articles b/bin/ak-articles index 9256d2a..2e94205 100755 --- a/bin/ak-articles +++ b/bin/ak-articles @@ -82,7 +82,7 @@ add(){ TITLE=$(head -n 1 $FILE) FILE_IPFS_HASH=$(ak-ipfs-add $FILE) FILE_SIGN_FILE=$FILE".asc" - gpg --detach-sign --sign-with $AK_FINGERPRINT --armor --output $FILE_SIGN_FILE $FILE + gpg2 --homedir $AK_GPGHOME --detach-sign --sign-with $AK_FINGERPRINT --armor --output $FILE_SIGN_FILE $FILE FILE_SIGNATURE=$(ak-ipfs-add $FILE_SIGN_FILE) cat > data < data < data else diff --git a/bin/ak-config b/bin/ak-config index 513c8dc..bc55b8e 100755 --- a/bin/ak-config +++ b/bin/ak-config @@ -44,7 +44,7 @@ published(){ # We will be using our public key also to put it in the block later KEY="tmp-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) rm $KEY diff --git a/bin/ak-data-expand b/bin/ak-data-expand index fc089c3..862fa75 100755 --- a/bin/ak-data-expand +++ b/bin/ak-data-expand @@ -64,7 +64,7 @@ then logit "[ERROR]" "Could not get GPG key: $gpg" exit 1 fi - gpg2 --import $gpg > /dev/null 2>&1 + gpg2 --homedir $AK_GPGHOME --import $gpg > /dev/null 2>&1 if [ "$?" -ne 0 ] then logit "[ERROR]" "Could not import GPG key: $gpg" @@ -85,7 +85,7 @@ then exit 1 fi logit "[INFO]" "Data downloaded: $DATA" - gpg2 --verify $DATA.asc $DATA > /dev/null 2>&1 + gpg2 --homedir $AK_GPGHOME --verify $DATA.asc $DATA > /dev/null 2>&1 if [ "$?" -ne 0 ] then logit "[ERROR]" "Error while verifying signature for $DATA" diff --git a/bin/ak-enter b/bin/ak-enter index 7d04693..64ef5a0 100755 --- a/bin/ak-enter +++ b/bin/ak-enter @@ -232,7 +232,7 @@ do logit "[ERROR]" "Could not get GPG key: $gpg ." exit 1 fi - gpg2 --import $gpg > /dev/null 2>&1 + gpg2 --homedir $AK_GPGHOME --import $gpg > /dev/null 2>&1 if [ "$?" -ne 0 ] then logit "[ERROR]" "Could not import GPG key: $gpg ." @@ -255,7 +255,7 @@ do fi logit "[INFO]" "Downloaded block $block." - gpg2 --verify $block.asc > /dev/null 2>&1 + gpg2 --homedir $AK_GPGHOME --verify $block.asc > /dev/null 2>&1 if [ "$?" -ne 0 ] then logit "[ERROR]" "Could not verify $block with GPG key $gpg." diff --git a/bin/ak-files b/bin/ak-files index d663d59..6e36b51 100755 --- a/bin/ak-files +++ b/bin/ak-files @@ -63,7 +63,7 @@ main(){ fi logit "[INFO]" "Signing..." SIGN_FILE=$FILENAME".asc" - gpg2 --detach-sign --sign-with $AK_FINGERPRINT --armor --output $SIGN_FILE $FILE + gpg2 --homedir $AK_GPGHOME --detach-sign --sign-with $AK_FINGERPRINT --armor --output $SIGN_FILE $FILE if [ $? == 0 ]; then logit "[INFO]" "Signed" else diff --git a/bin/ak-mixtapes b/bin/ak-mixtapes index 8c6089d..adbe52c 100755 --- a/bin/ak-mixtapes +++ b/bin/ak-mixtapes @@ -13,7 +13,7 @@ main(){ MIXTAPE_IPFS_HASH=$(ak-ipfs-add $MIXTAPE_FILE) MIXTAPE_SIGN_FILE=$MIXTAPE_FILE".asc" - gpg2 --detach-sign --sign-with $AK_FINGERPRINT --armor --output $MIXTAPE_SIGN_FILE $MIXTAPE_FILE + gpg2 --homedir $AK_GPGHOME --detach-sign --sign-with $AK_FINGERPRINT --armor --output $MIXTAPE_SIGN_FILE $MIXTAPE_FILE MIXTAPE_SIGNATURE=$(ak-ipfs-add $MIXTAPE_SIGN_FILE) diff --git a/bin/ak-news b/bin/ak-news index 2c0e9de..5103371 100755 --- a/bin/ak-news +++ b/bin/ak-news @@ -90,7 +90,7 @@ add2(){ TITLE=$(head -n 1 $FILE) FILE_IPFS_HASH=$(ak-ipfs-add $FILE) FILE_SIGN_FILE=$FILE".asc" - gpg --detach-sign --sign-with $AK_FINGERPRINT --armor --output $FILE_SIGN_FILE $FILE + gpg2 --homedir $AK_GPGHOME --detach-sign --sign-with $AK_FINGERPRINT --armor --output $FILE_SIGN_FILE $FILE FILE_SIGNATURE=$(ak-ipfs-add $FILE_SIGN_FILE) cat > data < data < data < data < data <