aboutsummaryrefslogtreecommitdiff
path: root/db/test
diff options
context:
space:
mode:
Diffstat (limited to 'db/test')
-rwxr-xr-xdb/test/find20
1 files changed, 20 insertions, 0 deletions
diff --git a/db/test/find b/db/test/find
new file mode 100755
index 0000000..d22d711
--- /dev/null
+++ b/db/test/find
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+TERM="$1"
+USER="root"
+
+DICT_DB="../dict.db"
+USER_DB="../user.db"
+FIND_SQL="../find.sql"
+
+cd "$(dirname "$0")"
+
+sqlite3 \
+ -markdown \
+ -cmd ".timer ON" \
+ -cmd ".param set :term '$TERM'" \
+ -cmd ".param set :user '$USER'" \
+ -cmd "attach '$DICT_DB' as dict" \
+ -cmd "attach '$USER_DB' as user" \
+ < "$FIND_SQL"
+