Merge branch 'master' of https://zdv2.bktei.com/gitweb/baltakatei-exdev
[BK-2020-03.git] / unitproc / bktemp-appendArgTar
index 4d8df3865cf1e8bbbdddd542c24657f90a266ffd..eadf6485b248b39c18d515f5b054e919c700796f 100644 (file)
@@ -8,7 +8,7 @@ try() { "$@" || die "cannot $*"; }
 appendArgTar(){
     # Desc: Writes first argument to temporary file with arguments as options, then appends file to tar
     # Usage: appendArgTar "$(echo "Data to be written.")" [name of file to be inserted] [tar path] [temp dir] ([cmd1] [cmd2] [cmd3] [cmd4]...)
-    # Version: 1.0.5
+    # Version: 1.0.6
     # Input: arg1: data to be written
     #        arg2: file name of file to be inserted into tar
     #        arg3: tar archive path (must exist first)
@@ -38,10 +38,10 @@ appendArgTar(){
     if ! [ -z "$4" ]; then tmpDir="$4"; else yell "ERROR:$fn:No temporary working dir set."; exit 1; fi
     
     # Set command strings
-    if ! [ -z "$5" ]; then cmd1="$5"; else cmd1="tee /dev/null "; fi # command string 1
-    if ! [ -z "$6" ]; then cmd2="$6"; else cmd2="tee /dev/null "; fi # command string 2
-    if ! [ -z "$7" ]; then cmd3="$7"; else cmd3="tee /dev/null "; fi # command string 3
-    if ! [ -z "$8" ]; then cmd4="$8"; else cmd4="tee /dev/null "; fi # command string 4
+    if ! [ -z "$5" ]; then cmd1="$5"; else cmd1="cat "; fi # command string 1
+    if ! [ -z "$6" ]; then cmd2="$6"; else cmd2="cat "; fi # command string 2
+    if ! [ -z "$7" ]; then cmd3="$7"; else cmd3="cat "; fi # command string 3
+    if ! [ -z "$8" ]; then cmd4="$8"; else cmd4="cat "; fi # command string 4
 
     # Input command
     cmd0="echo \"\$1\""