aboutsummaryrefslogtreecommitdiff
path: root/bin/pack_z_block
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2022-10-25 13:32:57 +0300
committerkaotisk <kaotisk@arching-kaos.org>2022-10-25 13:32:57 +0300
commitec812d4606fcda595448967b04ec6ee59ecba979 (patch)
tree9b46ab5d0ebdd1dca34ec33e3db4511c07c9345f /bin/pack_z_block
parentc230f21f1a7d52418cdc025b15e5cbd669204d9f (diff)
downloadarching-kaos-tools-ec812d4606fcda595448967b04ec6ee59ecba979.tar.gz
arching-kaos-tools-ec812d4606fcda595448967b04ec6ee59ecba979.tar.bz2
arching-kaos-tools-ec812d4606fcda595448967b04ec6ee59ecba979.zip
Adapting to 96ae225b2a179ec36fdb01eaf906fec096002a08 change
Diffstat (limited to 'bin/pack_z_block')
-rwxr-xr-xbin/pack_z_block11
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