forked from postgres/postgres
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathvector.sh
More file actions
executable file
·27 lines (20 loc) · 803 Bytes
/
vector.sh
File metadata and controls
executable file
·27 lines (20 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
. wasm-build/extension.sh
pushd $PG_EXTRA
# [ -d pgvector ] || git clone --no-tags --depth 1 --single-branch --branch master https://github.com/pgvector/pgvector
if [ -d vector ]
then
echo using local pgvector
else
wget -c -q https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.0.tar.gz -Opgvector.tar.gz
tar xvfz pgvector.tar.gz
mv pgvector-?.?.? vector
fi
popd
pushd $PG_EXTRA/vector
# path for wasm-shared already set to (pwd:pg build dir)/bin
# OPTFLAGS="" turns off arch optim (sse/neon).
PG_CONFIG=${PGROOT}/bin/pg_config emmake make OPTFLAGS="" install || exit 21
cp sql/vector--0.8.0.sql ${PGROOT}/share/postgresql/extension/
rm ${PGROOT}/share/postgresql/extension/vector--?.?.?--?.?.?.sql
popd