summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3df184e)
From one line to multiline
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.
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_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
declare -Ag appRollCall # Associative array for storing app status
declare -Ag fileRollCall # Associative array for storing file status
# Usage: magicWriteVersion
# Input: CONTENT_VERSION, FILEOUT_VERSION, PATHOUT_TAR, DIR_TMP
# Depends: dateTimeShort, appendArgTar
# Usage: magicWriteVersion
# Input: CONTENT_VERSION, FILEOUT_VERSION, PATHOUT_TAR, DIR_TMP
# Depends: dateTimeShort, appendArgTar
# Generate VERSION file in BashVar
FILEOUT_VERSION="$(dateTimeShort)..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()
# 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()