1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p coreutils curl jq
5 cd $
(dirname "${BASH_SOURCE[0]}")
8 sed -i "s|$2 = \".*\"|$2 = \"${3:-}\"|" $1
11 version
=$
(curl
-s --show-error "https://api.github.com/repos/zadam/trilium/releases/latest" | jq
-r '.tag_name' |
tail -c +2)
13 # Update desktop application
14 sha256_linux64
=$
(nix-prefetch-url
--quiet https
://github.com
/zadam
/trilium
/releases
/download
/v
${version}/trilium-linux-x64-
${version}.
tar.xz
)
15 sha256_darwin64
=$
(nix-prefetch-url
--quiet https
://github.com
/zadam
/trilium
/releases
/download
/v
${version}/trilium-mac-x64-
${version}.
zip)
16 setKV .
/desktop.nix version
$version
17 setKV .
/desktop.nix linuxSource.sha256
$sha256_linux64
18 setKV .
/desktop.nix darwinSource.sha256
$sha256_darwin64
21 sha256_linux64_server
=$
(nix-prefetch-url
--quiet https
://github.com
/zadam
/trilium
/releases
/download
/v
${version}/trilium-linux-x64-server-
${version}.
tar.xz
)
22 setKV .
/server.nix version
$version
23 setKV .
/server.nix serverSource.sha256
$sha256_linux64_server