aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-zblock-cache
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-03-01 19:26:24 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-03-01 19:26:24 +0200
commitf8d2236e55e5c369b218017d1de1058d6a8ee361 (patch)
tree1cdd4ea1476c3062d3dd38ee1ba62d6bb98eb680 /bin/ak-zblock-cache
parent7affa2082f61455a413d0c8fea08e79935d4f308 (diff)
downloadarching-kaos-tools-f8d2236e55e5c369b218017d1de1058d6a8ee361.tar.gz
arching-kaos-tools-f8d2236e55e5c369b218017d1de1058d6a8ee361.tar.bz2
arching-kaos-tools-f8d2236e55e5c369b218017d1de1058d6a8ee361.zip
Log formatting adjustment
Diffstat (limited to 'bin/ak-zblock-cache')
-rwxr-xr-xbin/ak-zblock-cache14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/ak-zblock-cache b/bin/ak-zblock-cache
index f1a1c2b..ca4f736 100755
--- a/bin/ak-zblock-cache
+++ b/bin/ak-zblock-cache
@@ -1,7 +1,7 @@
#!/bin/bash
PROGRAM="$(basename $0)"
logit(){
- ak-logthis "<$PROGRAM>" "$1" "$2"
+ ak-logthis "$PROGRAM" "$1" "$2"
}
if [ ! -d "$AK_CACHEDIR/fzblocks" ]
@@ -15,16 +15,16 @@ then
then
if [ "$(sha512sum $AK_ZBLOCKDIR/$1 | awk '{ print $1 }')" == "$(ak-zblock-show $1 | sha512sum | awk '{ print $1 }')" ]
then
- logit "[INFO]" "Cache already there and updated"
+ logit "INFO" "Cache already there and updated"
else
- logit "[INFO]" "Updating cache"
+ logit "INFO" "Updating cache"
ak-zblock-show "$1" > $AK_CACHEDIR/fzblocks/$1
fi
- logit "[INFO]" "No cache found. Caching..."
+ logit "INFO" "No cache found. Caching..."
ak-zblock-show "$1"
if [ "$?" -ne "0" ]
then
- logit "[ERROR]" "ak-zblock-show failed..."
+ logit "ERROR" "ak-zblock-show failed..."
exit 2
fi
ak-zblock-show "$1" > $AK_CACHEDIR/fzblocks/$1
@@ -32,10 +32,10 @@ then
ak-zblock-show "$1" > $AK_CACHEDIR/fzblocks/$1
if [ "$?" -ne "0" ]
then
- logit "[ERROR]" "ak-zblock-show failed..."
+ logit "ERROR" "ak-zblock-show failed..."
exit 2
fi
- logit "[ERROR]" "Could not find zblock $1..."
+ logit "ERROR" "Could not find zblock $1..."
exit 1
fi
exit 0