debug(bklog):Test more direct tar --append operation
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Sat, 11 Jul 2020 07:51:48 +0000 (07:51 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Sat, 11 Jul 2020 07:51:48 +0000 (07:51 +0000)
exec/bklog

index a78b19f6a7b8a975aea81600562a1b051296d1e9..c2cb485686d7da36f79983af057826a7a6616c31 100644 (file)
@@ -11,7 +11,7 @@ dirTmpDefault="/dev/shm"; # Default parent of working directory
 
 # Script Metadata
 scriptName="bklog";             # Define basename of script file.
 
 # Script Metadata
 scriptName="bklog";             # Define basename of script file.
-scriptVersion="0.1.20";          # Define version of script.
+scriptVersion="0.1.21";          # Define version of script.
 scriptURL="https://gitlab.com/baltakatei/ninfacyzga-01"; # Define wesite hosting this script.
 scriptTimeStart="$(date +%Y%m%dT%H%M%S.%N)"; # YYYYmmddTHHMMSS.NNNNNNNNN
 scriptHostname=$(hostname);     # Save hostname of system running this script.
 scriptURL="https://gitlab.com/baltakatei/ninfacyzga-01"; # Define wesite hosting this script.
 scriptTimeStart="$(date +%Y%m%dT%H%M%S.%N)"; # YYYYmmddTHHMMSS.NNNNNNNNN
 scriptHostname=$(hostname);     # Save hostname of system running this script.
@@ -1258,6 +1258,12 @@ magicProcessWriteBuffer() {
     writeCmd4="$cmd_encrypt";
     
     ## Process buffer and write to dir_tmp
     writeCmd4="$cmd_encrypt";
     
     ## Process buffer and write to dir_tmp
+    vbm "DEBUG :$fn:fileouts    element count:${#fileouts[@]}";
+    vbm "DEBUG :$fn:pathouts    element count:${#pathouts[@]}";
+    vbm "DEBUG :$fn:procStrings element count:${#pathouts[@]}";
+    vbm "DEBUG :$fn:fileouts    contents:${fileouts[*]}";
+    vbm "DEBUG :$fn:pathouts    contents:${pathouts[*]}";
+    vbm "DEBUG :$fn:procStrings contents:${pathouts[*]}";
     for index in "${!pathouts[@]}"; do
        writeCmd2="${procStrings[$index]}";
        writeCmdAll="$writeCmd1 | $writeCmd2 | $writeCmd3 | $writeCmd4" && vbm "STATUS:$fn:Assembled command:\"$writeCmdAll\"";
     for index in "${!pathouts[@]}"; do
        writeCmd2="${procStrings[$index]}";
        writeCmdAll="$writeCmd1 | $writeCmd2 | $writeCmd3 | $writeCmd4" && vbm "STATUS:$fn:Assembled command:\"$writeCmdAll\"";
@@ -1267,8 +1273,9 @@ magicProcessWriteBuffer() {
     # Append dir_tmp files to pathout_tar
     wait; # Wait to avoid collision with older magicProcessWriteBuffer() instances (see https://www.tldp.org/LDP/abs/html/x9644.html )
     for index in "${!pathouts[@]}"; do
     # Append dir_tmp files to pathout_tar
     wait; # Wait to avoid collision with older magicProcessWriteBuffer() instances (see https://www.tldp.org/LDP/abs/html/x9644.html )
     for index in "${!pathouts[@]}"; do
-       appendFileTar "${pathouts[$index]}" "${fileouts[$index]}" "$pathout_tar" "$dir_tmp" && \
+       tar --apend --directory="$dir_tmp" --file="$pathout_tar" "${fileouts[$index]}" && \
            vbm "STATUS:$fn:Appended ${pathouts[$index]} to $pathout_tar";
            vbm "STATUS:$fn:Appended ${pathouts[$index]} to $pathout_tar";
+       #appendFileTar "${pathouts[$index]}" "${fileouts[$index]}" "$pathout_tar" "$dir_tmp" && \
     done;
     
     # Remove secured chunks from dir_tmp
     done;
     
     # Remove secured chunks from dir_tmp