2018-08-31 03:57:14 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
PKG_DIR=dist/trilium-linux-x64-server
|
2019-07-06 22:48:06 +08:00
|
|
|
NODE_VERSION=12.6.0
|
2018-08-31 03:57:14 +08:00
|
|
|
|
|
|
|
rm -r $PKG_DIR
|
|
|
|
mkdir $PKG_DIR
|
|
|
|
cd $PKG_DIR
|
|
|
|
|
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
|
|
|
|
|
|
|
|
mv node-v${NODE_VERSION}-linux-x64 node
|
|
|
|
|
|
|
|
cp -r ../../node_modules/ ./
|
2019-04-02 05:11:06 +08:00
|
|
|
cp -r ../../images/ ./
|
|
|
|
cp -r ../../libraries/ ./
|
2018-08-31 03:57:14 +08:00
|
|
|
cp -r ../../src/ ./
|
|
|
|
cp -r ../../db/ ./
|
|
|
|
cp -r ../../package.json ./
|
|
|
|
cp -r ../../package-lock.json ./
|
|
|
|
cp -r ../../README.md ./
|
|
|
|
cp -r ../../LICENSE ./
|
|
|
|
cp -r ../../config-sample.ini ./
|
|
|
|
|
|
|
|
rm -r ./node_modules/electron*
|
|
|
|
|
2018-12-09 18:41:32 +08:00
|
|
|
rm -r ./node_modules/sqlite3/lib/binding/*
|
|
|
|
|
|
|
|
cp -r ../../bin/deps/linux-x64/sqlite/node* ./node_modules/sqlite3/lib/binding/
|
|
|
|
|
2018-08-31 03:57:14 +08:00
|
|
|
printf "#/bin/sh\n./node/bin/node src/www" > trilium.sh
|
|
|
|
chmod 755 trilium.sh
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
2018-12-10 04:50:29 +08:00
|
|
|
VERSION=`jq -r ".version" ../package.json`
|
2019-01-13 02:48:45 +08:00
|
|
|
|
2019-01-15 07:10:47 +08:00
|
|
|
tar cJf trilium-linux-x64-server-${VERSION}.tar.xz trilium-linux-x64-server
|