aboutsummaryrefslogtreecommitdiff
path: root/db/test/find
blob: d22d711d270ff98a2c3dc7e5f6bc46954b56decf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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"