X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02.git/blobdiff_plain/3395ae224838d372dbb3422c0f3870b005cb494b..f5def0c431bb325b47d1a3b8dd062115d8977eb8:/exec/bkgpslog diff --git a/exec/bkgpslog b/exec/bkgpslog index 19f95f2..9289064 100755 --- a/exec/bkgpslog +++ b/exec/bkgpslog @@ -14,7 +14,8 @@ DIR_TMP_DEFAULT="/dev/shm"; # Default parent of working directory SCRIPT_TIME_START=$(date +%Y%m%dT%H%M%S.%N); PATH="$HOME/.local/bin:$PATH"; # Add "$(systemd-path user-binaries)" path in case apps saved there SCRIPT_HOSTNAME=$(hostname); # Save hostname of system running this script. -SCRIPT_VERSION="bkgpslog 0.2.0"; # Define version of script. +SCRIPT_VERSION="bkgpslog 0.2.1"; # Define version of script. +SCRIPT_NAME="$(basename "$0")"; # Define basename of script file. declare -Ag appRollCall # Associative array for storing app status declare -Ag fileRollCall # Associative array for storing file status @@ -714,10 +715,16 @@ magicWriteVersion() { # 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="$(dateTimeShort):$(basename "$0")"" Version:""$SCRIPT_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()