+magicWriteVersion() {
+ # Desc: Appends time-stamped VERSION to PATHOUT_TAR
+ # Usage: magicWriteVersion
+ # Input: CONTENT_VERSION, FILEOUT_VERSION, PATHOUT_TAR, DIR_TMP
+ # Depends: dateTimeShort, appendArgTar
+ local CONTENT_VERSION
+
+ # Generate VERSION file in BashVar
+ FILEOUT_VERSION="$(dateTimeShort)..VERSION";
+ CONTENT_VERSION="VERSION=$SCRIPT_VERSION";
+ CONTENT_VERSION="$CONTENT_VERSION""\n""SCRIPT_NAME=SCRIPT_NAME";
+ CONTENT_VERSION="$CONTENT_VERSION""\n""DATE=$(date --iso-8601=seconds)";
+ CONTENT_VERSION="$CONTENT_VERSION""\n""HOSTNAME=$SCRIPT_HOSTNAME";
+ CONTENT_VERSION="$(echo -e "$CONTENT_VERSION")"
+
+ # Create BashVar as file FILEOUT_VERSION and write-append to PATHOUT_TAR
+ appendArgTar "$CONTENT_VERSION" "$FILEOUT_VERSION" "$PATHOUT_TAR" "$DIR_TMP";
+} # bkgpslog: write version data to PATHOUT_TAR via appendArgTar()