diff --git a/lib/functions.sh b/lib/functions.sh index b4a8c9b..10d7c31 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -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 -