Deal with multiple data files

The original TransFAIR logic was only able to handle a single CSV file
and broke if there were more. This commit fixes that.
This commit is contained in:
Bridgehead User 2024-07-12 08:45:17 +02:00
parent 105495d6cd
commit 2e8b1dc96c
1 changed files with 3 additions and 3 deletions

View File

@ -282,9 +282,9 @@ function build_transfair() {
# We only take the touble to build transfair if:
#
# 1. There is no data lock file (which means that no ETL has yet been run) and
# 2. There is data available.
if [ -f ../ecdc/data/*.[cC][sS][vV] ] && [ ! -f ../ecdc/data/lock ]; then
# 1. There is data available (any CSV files) and
# 2. There is no data lock file (which means that no ETL has yet been run).
if ls ../ecdc/data/*.[cC][sS][vV] 1> /dev/null 2>&1 && [ ! -f ../ecdc/data/lock ]; then
cd $base_dir/transfair
docker build --progress=plain -t samply/transfair --no-cache .
cd -