Prepare directory for partial account statements and checking modification time.

This commit is contained in:
Dominik Pantůček 2023-05-25 15:52:52 +02:00
parent 474c5a06fa
commit 22fc0c0c5a

View file

@ -92,12 +92,25 @@ else
APIKEYS_FILE="$ARG_APIKEYS_FILE"
fi
# Storage for partial account statements
BANK_DIR_PARTS="$BANK_DIR/parts"
if ! [ -d "$BANK_DIR_PARTS" ] ; then
mkdir -p "$BANK_DIR_PARTS"
fi
#
# Very simple "logging" function (stdout should be redirected to log anyway)
log() {
echo `date '+%Y-%m-%d %H:%M:%S'` "$@"
}
#
# Returns the file modification date in YYYY-MM-DD format
get_file_date() {
STAT=`stat -c %y "$1"`
echo ${STAT%% *}
}
# Mark
log "$0" ======== started ========