X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/49c107c6bae333ff2273b5d35b8d53791ab46f3a..c5981ead1bc78d2845bdc1e32df3b57994b7ae62:/unitproc/bktemp-appendArgTar?ds=sidebyside diff --git a/unitproc/bktemp-appendArgTar b/unitproc/bktemp-appendArgTar index 4d8df38..eadf648 100644 --- a/unitproc/bktemp-appendArgTar +++ b/unitproc/bktemp-appendArgTar @@ -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\""