style(unitproc):appendArgTar: Simplify command string eval cmd
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Sat, 4 Jul 2020 00:19:54 +0000 (00:19 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Sat, 4 Jul 2020 00:19:54 +0000 (00:19 +0000)
unitproc/bktemp-appendArgTar

index fedd6684ef71506ad8d2e6fac42ea82ff46f2ce9..e3ecb228ff397bf677ad1aa51fe93d51603d2d51 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.3
+    # Version: 1.0.4
     # Input: arg1: data to be written
     #        arg2: file name of file to be inserted into tar
     #        arg3: tar archive path (must exist first)
@@ -55,7 +55,7 @@ appendArgTar(){
     # yell "DEBUG:STATUS:$FN:TMP_DIR:$TMP_DIR"
     
     # Write to temporary working dir
-    eval "$CMD0"" | ""$CMD1"" | ""$CMD2"" | ""$CMD3"" | ""$CMD4" > "$TMP_DIR"/"$FILENAME";
+    eval "$CMD0 | $CMD1 | $CMD2 | $CMD3 | $CMD4" > "$TMP_DIR"/"$FILENAME";
 
     # Append to tar
     try tar --append --directory="$TMP_DIR" --file="$TAR_PATH" "$FILENAME";