diff --git a/fetch_fio.sh b/fetch_fio.sh index 03be274..f4f2477 100644 --- a/fetch_fio.sh +++ b/fetch_fio.sh @@ -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 ========