From ec812d4606fcda595448967b04ec6ee59ecba979 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Tue, 25 Oct 2022 13:32:57 +0300 Subject: Adapting to 96ae225b2a179ec36fdb01eaf906fec096002a08 change --- bin/pack_z_block | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bin/pack_z_block') diff --git a/bin/pack_z_block b/bin/pack_z_block index b166463..158a2cd 100755 --- a/bin/pack_z_block +++ b/bin/pack_z_block @@ -14,7 +14,12 @@ # The following example finds kaos@kaos.kaos' GPG fingerprint like this # FINGERPRINT="$(gpg2 --list-keys | grep kaos@kaos.kaos -1 | head -n1 | awk '{print $1}')" -PROGRAM="pack_z_block" +PROGRAM="$(basename $0)" + +# Logging patch +logit(){ + logthis "<$PROGRAM>" "$1" "$2" +} # Below, the usage information usage(){ @@ -34,7 +39,7 @@ usage(){ main(){ - logthis "[INFO]" "We are doing" $ACTION "with content" $MESSAGE + logit "[INFO]" "We are doing" $ACTION "with content" $MESSAGE # We add it to IPFS MESSAGE_HASH=$(ipfs add -q $MESSAGE) @@ -96,7 +101,7 @@ then if [ -f "$MESSAGE" ]; then main else - logthis "[ERROR]" "File does not exist. Aborting..." + logit "[ERROR]" "File does not exist. Aborting..." exit 1 fi -- cgit v1.2.3