From e0aa55c0383e519d7aeb8295bafe101eb379d717 Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Fri, 29 Mar 2024 04:50:04 +0700 Subject: [PATCH] Minor change to contrib/usql-test.sh --- contrib/usql-test.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/contrib/usql-test.sh b/contrib/usql-test.sh index 26d0cfa740b..75dea565b7e 100755 --- a/contrib/usql-test.sh +++ b/contrib/usql-test.sh @@ -1,28 +1,25 @@ #!/bin/bash -SRC=$(realpath $(cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )) +SRC=$(realpath $(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)) USQL=$(which usql) if [ -f $SRC/../usql ]; then USQL=$(realpath $SRC/../usql) fi +export USQL_SHOW_HOST_INFORMATION=false for TARGET in $SRC/*/usql-config; do NAME=$(basename $(dirname $TARGET)) if [[ ! -z "$(podman ps -q --filter "name=$NAME")" || "$NAME" == "duckdb" || "$NAME" == "sqlite3" ]]; then unset DB VSQL source $TARGET - if [ -z "$DB" ]; then - echo "error: DB not defined in $TARGET/usql-config!" - exit 1 - fi - if [ -z "$VSQL" ]; then - echo "error: VSQL not defined in $TARGET/usql-config!" - exit 1 + if [[ -z "$DB" || -z "$VSQL" ]]; then + echo -e "ERROR: DB or VSQL not defined in $TARGET!\n" + continue fi (set -x; - USQL_SHOW_HOST_INFORMATION=false \ - $USQL "$DB" -X -J -c "$VSQL" + $USQL "$DB" -X -J -c "$VSQL" ) + echo fi done