diff options
Diffstat (limited to 'bin/ak-sm-merkle-tree')
-rwxr-xr-x | bin/ak-sm-merkle-tree | 40 |
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 |