aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-sm-merkle-tree
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-sm-merkle-tree
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-sm-merkle-tree')
-rwxr-xr-xbin/ak-sm-merkle-tree40
1 files changed, 20 insertions, 20 deletions
diff --git a/bin/ak-sm-merkle-tree b/bin/ak-sm-merkle-tree
index 461930f..2ba5e91 100755
--- a/bin/ak-sm-merkle-tree
+++ b/bin/ak-sm-merkle-tree
@@ -26,7 +26,7 @@ PROGRAM="$(basename $0)"
if [ ! -f "$1" ]
then
- echo "[ERROR] File not found"
+ echo "ERROR File not found"
exit 1
else
base64 $1 > file
@@ -43,31 +43,31 @@ MERKLEDIR="$AK_WORKDIR/fmrk/"
TEMPORARYDIR="$(ak-tempassin)"
# A subdir to split the files there
TECHDIR="$TEMPORARYDIR/chks/"
-# A pin point to return from where we came from
+# A pin point to return from where we came from
CURRENTDIR="$(pwd)/"
# Our snippet for logging debug info
logit(){
- ak-logthis "<$PROGRAM>" "$1" "$2"
+ ak-logthis "$PROGRAM" "$1" "$2"
}
# Checking directories and create them if necessary
rm -rf $TEMPORARYDIR
-
+
# TECHDIR
if [ ! -d "$TECHDIR" ]
then
mkdir -p "$TECHDIR"
if [ "$?" == 0 ]
then
- logit "[INFO]" "Folder $TECHDIR created!"
+ logit "INFO" "Folder $TECHDIR created!"
else
- logit "[ERROR]" "Problem occured while creating $TECHDIR"
- echo "[ERROR] Can't create $TECHDIR"
+ logit "ERROR" "Problem occured while creating $TECHDIR"
+ echo "ERROR Can't create $TECHDIR"
exit 1
fi
else
- logit "[INFO]" "Temp dir found"
+ logit "INFO" "Temp dir found"
fi
# FILEMAPSDIR
@@ -76,14 +76,14 @@ then
mkdir -p "$FILEMAPSDIR"
if [ "$?" == 0 ]
then
- logit "[INFO]" "Folder $FILEMAPSDIR created!"
+ logit "INFO" "Folder $FILEMAPSDIR created!"
else
- logit "[ERROR]" "Problem occured while creating $FILEMAPSDIR"
- echo "[ERROR] Can't create $FILEMAPSDIR"
+ logit "ERROR" "Problem occured while creating $FILEMAPSDIR"
+ echo "ERROR Can't create $FILEMAPSDIR"
exit 1
fi
else
- logit "[INFO]" "Mapsdir found"
+ logit "INFO" "Mapsdir found"
fi
# CHKDIR
@@ -92,14 +92,14 @@ then
mkdir -p "$CHKDIR"
if [ "$?" == 0 ]
then
- logit "[INFO]" "Folder $CHKDIR created!"
+ logit "INFO" "Folder $CHKDIR created!"
else
- logit "[ERROR]" "Problem occured while creating $CHKDIR"
- echo "[ERROR] Can't create $CHKDIR"
+ logit "ERROR" "Problem occured while creating $CHKDIR"
+ echo "ERROR Can't create $CHKDIR"
exit 1
fi
else
- logit "[INFO]" "Workdir found"
+ logit "INFO" "Workdir found"
fi
# MERKLEDIR
@@ -108,14 +108,14 @@ then
mkdir -p "$MERKLEDIR"
if [ "$?" == 0 ]
then
- logit "[INFO]" "Folder $MERKLEDIR created!"
+ logit "INFO" "Folder $MERKLEDIR created!"
else
- logit "[ERROR]" "Problem occured while creating $MERKLEDIR"
- echo "[ERROR] Can't create $MERKLEDIR"
+ logit "ERROR" "Problem occured while creating $MERKLEDIR"
+ echo "ERROR Can't create $MERKLEDIR"
exit 1
fi
else
- logit "[INFO]" "Workdir found"
+ logit "INFO" "Workdir found"
fi
# Uncomment next line in case you want to debug the resulting script as well
# echo 'set -xe' > $TEMPORARYDIR/cmd_queue.sh