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