dangkhoa2016's picture
chore: add manual curl test scripts and DB inspection
dcb1716
Raw History Blame Contribute Delete
525 Bytes
#!/usr/bin/env bash
set -e
DB="${1:-storage/data.db}"
DIR=$(dirname "$0")
sqlite3 -header -column "$DB" <<SQL
$(awk '
/^-- [0-9]+\./ {
gsub(/^-- /, "")
title = $0
line = title; gsub(/./, "─", line)
print ".print \"\""
print ".print \"β”Œβ”€" line "─┐\""
print ".print \"β”‚ " title " β”‚\""
print ".print \"└─" line "β”€β”˜\""
next
}
/^-- =/ { next }
/^-- Usage/ { next }
/^-- \.\.\./ { next }
/^--$/ { next }
1
' "$DIR/inspect-queries.sql")
SQL