aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-news
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-03-27 03:49:27 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-03-27 03:49:27 +0200
commit28717aded7df4ac4842fa308e67c1c15e1de4ffa (patch)
tree64a93db7a952dabf5c2af3b7776bdcf0d050e181 /bin/ak-news
parentabdfe0a5c2a86f19aafe12ae70663ddcf83a6e39 (diff)
downloadarching-kaos-tools-28717aded7df4ac4842fa308e67c1c15e1de4ffa.tar.gz
arching-kaos-tools-28717aded7df4ac4842fa308e67c1c15e1de4ffa.tar.bz2
arching-kaos-tools-28717aded7df4ac4842fa308e67c1c15e1de4ffa.zip
Introduced and applied _ak_gpg library
Diffstat (limited to 'bin/ak-news')
-rwxr-xr-xbin/ak-news5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ak-news b/bin/ak-news
index 5dbc847..84458c8 100755
--- a/bin/ak-news
+++ b/bin/ak-news
@@ -7,6 +7,7 @@ TEMP="/tmp/aktmp"
source $AK_LIBDIR/_ak_logit
source $AK_LIBDIR/_ak_script_description
+source $AK_LIBDIR/_ak_gpg
if [ ! -d $ZNEWSDIR ]; then
mkdir $ZNEWSDIR
@@ -103,7 +104,7 @@ _ak_modules_news_add_from_file(){
TITLE=$(head -n 1 $FILE)
FILE_IPFS_HASH=$(ak-ipfs-add $FILE)
FILE_SIGN_FILE=$FILE".asc"
- gpg2 --homedir $AK_GPGHOME --detach-sign --sign-with $AK_FINGERPRINT --armor --output $FILE_SIGN_FILE $FILE
+ _ak_gpg_sign_detached $FILE_SIGN_FILE $FILE
FILE_SIGNATURE=$(ak-ipfs-add $FILE_SIGN_FILE)
cat > data <<EOF
{
@@ -139,7 +140,7 @@ _ak_modules_news_add(){
TITLE=$(head -n 1 $ZNEWSDIR/$FILE)
FILE_IPFS_HASH=$(ak-ipfs-add $ZNEWSDIR/$FILE)
FILE_SIGN_FILE=$FILE".asc"
- gpg2 --homedir $AK_GPGHOME --detach-sign --sign-with $AK_FINGERPRINT --armor --output $FILE_SIGN_FILE $ZNEWSDIR/$FILE
+ _ak_gpg_sign_detached $FILE_SIGN_FILE $ZNEWSDIR/$FILE
FILE_SIGNATURE=$(ak-ipfs-add $FILE_SIGN_FILE)
cat > data <<EOF
{