2018-08-31 03:57:14 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-10-16 02:32:43 +08:00
|
|
|
PKG_DIR=dist/trilium-linux-x64-server
|
2019-10-25 05:02:29 +08:00
|
|
|
NODE_VERSION=12.13.0
|
2018-08-31 03:57:14 +08:00
|
|
|
|
2019-10-12 03:22:59 +08:00
|
|
|
if [ "$1" != "DONTCOPY" ]
|
|
|
|
then
|
|
|
|
./bin/copy-trilium.sh $PKG_DIR
|
|
|
|
fi
|
2018-08-31 03:57:14 +08:00
|
|
|
|
2019-10-12 03:22:59 +08:00
|
|
|
cd dist
|
2018-09-09 23:53:55 +08:00
|
|
|
wget https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz
|
2018-08-31 03:57:14 +08:00
|
|
|
tar xvfJ node-v${NODE_VERSION}-linux-x64.tar.xz
|
|
|
|
rm node-v${NODE_VERSION}-linux-x64.tar.xz
|
2019-10-12 03:22:59 +08:00
|
|
|
cd ..
|
2018-08-31 03:57:14 +08:00
|
|
|
|
2019-10-12 03:22:59 +08:00
|
|
|
mv dist/node-v${NODE_VERSION}-linux-x64 $PKG_DIR/node
|
2018-08-31 03:57:14 +08:00
|
|
|
|
2019-10-12 03:22:59 +08:00
|
|
|
rm -r $PKG_DIR/node_modules/electron*
|
2018-08-31 03:57:14 +08:00
|
|
|
|
2019-10-12 03:22:59 +08:00
|
|
|
rm -r $PKG_DIR/node_modules/sqlite3/lib/binding/*
|
2018-12-09 18:41:32 +08:00
|
|
|
|
2019-10-12 03:22:59 +08:00
|
|
|
cp -r ./bin/deps/linux-x64/sqlite/node* $PKG_DIR/node_modules/sqlite3/lib/binding/
|
2018-12-09 18:41:32 +08:00
|
|
|
|
2019-10-12 03:22:59 +08:00
|
|
|
printf "#!/bin/sh\n./node/bin/node src/www" > $PKG_DIR/trilium.sh
|
|
|
|
chmod 755 $PKG_DIR/trilium.sh
|
2018-08-31 03:57:14 +08:00
|
|
|
|
2019-10-12 03:22:59 +08:00
|
|
|
VERSION=`jq -r ".version" package.json`
|
2018-08-31 03:57:14 +08:00
|
|
|
|
2019-10-12 03:22:59 +08:00
|
|
|
cd dist
|
2019-01-13 02:48:45 +08:00
|
|
|
|
2019-10-16 02:32:43 +08:00
|
|
|
tar cJf trilium-linux-x64-server-${VERSION}.tar.xz trilium-linux-x64-server
|