diff options
Diffstat (limited to 'bin/pack_z_block')
-rwxr-xr-x | bin/pack_z_block | 11 |
1 files changed, 8 insertions, 3 deletions
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 |