Prepare directory for partial account statements and checking modification time.
This commit is contained in:
parent
474c5a06fa
commit
22fc0c0c5a
1 changed files with 13 additions and 0 deletions
13
fetch_fio.sh
13
fetch_fio.sh
|
@ -92,12 +92,25 @@ else
|
||||||
APIKEYS_FILE="$ARG_APIKEYS_FILE"
|
APIKEYS_FILE="$ARG_APIKEYS_FILE"
|
||||||
fi
|
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)
|
# Very simple "logging" function (stdout should be redirected to log anyway)
|
||||||
log() {
|
log() {
|
||||||
echo `date '+%Y-%m-%d %H:%M:%S'` "$@"
|
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
|
# Mark
|
||||||
log "$0" ======== started ========
|
log "$0" ======== started ========
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue