From 48d1062b4fb390f5d8b7eff6949c4dfff5adaa90 Mon Sep 17 00:00:00 2001 From: Johan Le Baut Date: Fri, 14 Oct 2022 10:56:42 +0200 Subject: [PATCH] ingest script: filter out too verbose warning --- data-ingest/i | 12 ++++++++++++ data-ingest/ingest | 7 ++++++- data-ingest/j | 3 +++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 data-ingest/i create mode 100644 data-ingest/j diff --git a/data-ingest/i b/data-ingest/i new file mode 100755 index 0000000..2c6651d --- /dev/null +++ b/data-ingest/i @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -eau -o pipefail + +rc=0 +# false | false || rc="${PIPESTATUS[@]}" + + +out=$(echo toto && false) || rc=2 + +echo $out +echo $? +echo $rc diff --git a/data-ingest/ingest b/data-ingest/ingest index e78fa28..13578e9 100755 --- a/data-ingest/ingest +++ b/data-ingest/ingest @@ -31,7 +31,12 @@ EOF done echo "" -sqlite3 "${fullDbPath}" < "${tmpSql}" +rc=0 +sqlite3 "${fullDbPath}" < "${tmpSql}" 2>&1 | grep -v "filling the rest with NULL" || rc="${PIPESTATUS[0]}" +if [[ $rc -ne 0 ]]; then + echo "Error executing sqlite import" + exit "$rc" +fi echo "[+] Ingesting spatial data." diff --git a/data-ingest/j b/data-ingest/j new file mode 100644 index 0000000..4c19a0d --- /dev/null +++ b/data-ingest/j @@ -0,0 +1,3 @@ +toto +toti +toto