From 87dd453a1e741c0874f4288847504b1f50a94897 Mon Sep 17 00:00:00 2001 From: olli Date: Wed, 7 Feb 2024 12:18:53 +0100 Subject: [PATCH] fix: first run --- dabo/functions/get_coingecko_data.sh | 1 + dabo/functions/market_performance.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dabo/functions/get_coingecko_data.sh b/dabo/functions/get_coingecko_data.sh index 256162d..78cfd28 100644 --- a/dabo/functions/get_coingecko_data.sh +++ b/dabo/functions/get_coingecko_data.sh @@ -1,6 +1,7 @@ function get_coingecko_data { # get data from coingecko local f_gecko_currencies="usd eur" + [ -f COINGECKO_GET_ASSETS_CMD_OUT ] || touch -t 197001010000 COINGECKO_GET_ASSETS_CMD_OUT if find COINGECKO_GET_ASSETS_CMD_OUT -mmin +5 2>/dev/null | grep -q COINGECKO_GET_ASSETS_CMD_OUT then for f_gecko_currency in ${f_gecko_currencies} diff --git a/dabo/functions/market_performance.sh b/dabo/functions/market_performance.sh index 924796d..45ea4ba 100644 --- a/dabo/functions/market_performance.sh +++ b/dabo/functions/market_performance.sh @@ -1,7 +1,7 @@ function market_performance { g_echo_note "RUNNING FUNCTION ${FUNCNAME} $@" - if find MARKET_PERFORMANCE.csv -mmin -${INTERVAL_MIN} | grep -q "MARKET_PERFORMANCE.csv" + if find MARKET_PERFORMANCE.csv -mmin -${INTERVAL_MIN} 2>/dev/null | grep -q "MARKET_PERFORMANCE.csv" then g_echo_note "MARKET_PERFORMANCE.csv already downloaded in the last ${INTERVAL_MIN} minutes" return 0