fix: first run

This commit is contained in:
olli 2024-02-07 12:26:32 +01:00
parent 0ff4932e48
commit c2145ed16e

View File

@ -14,7 +14,7 @@ function get_coingecko_data {
mv COINGECKO_GET_ASSETS_${f_gecko_currency}_CMD_OUT_TMP COINGECKO_GET_ASSETS_${f_gecko_currency}_CMD_OUT
[[ ${f_gecko_currency} =~ ^usd ]] && cat COINGECKO_GET_ASSETS_${f_gecko_currency}_CMD_OUT >COINGECKO_GET_ASSETS_CMD_OUT
else
find COINGECKO_GET_ASSETS_${f_gecko_currency}_CMD_OUT -mmin +15 | grep -q COINGECKO_GET_ASSETS_${f_gecko_currency}_CMD_OUT && g_echo_warn "Coingecko data older then 15min: $(ls -l COINGECKO_GET_ASSETS_${f_gecko_currency}_CMD_OUT)"
find COINGECKO_GET_ASSETS_${f_gecko_currency}_CMD_OUT -mmin +15 2>/dev/null | grep -q COINGECKO_GET_ASSETS_${f_gecko_currency}_CMD_OUT && g_echo_warn "Coingecko data older then 15min: $(ls -l COINGECKO_GET_ASSETS_${f_gecko_currency}_CMD_OUT)"
return 1
fi
done