/
Syncthing.json
51 lines (51 loc) · 2.53 KB
/
Syncthing.json
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
"version": "1.27.6",
"description": "Open Source Continuous File Synchronization.",
"homepage": "https://syncthing.net/",
"license": "MPL-2.0",
"notes": "To start syncthing automatically, use a method described at https://github.com/syncthing/docs/blob/main/users/autostart.rst#windows",
"architecture": {
"64bit": {
"url": "https://github.com/syncthing/syncthing/releases/download/v1.27.6/syncthing-windows-amd64-v1.27.6.zip",
"hash": "d045f770cf60775105a402040e37d39f8d78085c1a922f977452ccccedebda57",
"extract_dir": "syncthing-windows-amd64-v1.27.6"
}
},
"pre_install": [
"if (!(Test-Path \"$persist_dir\\config\") -and (Test-Path \"$env:LOCALAPPDATA\\Syncthing\")) {",
" info \"Copying old '$env:LOCALAPPDATA\\Syncthing' to '$persist_dir\\config'\"",
" ensure \"$dir\\config\" | Out-Null",
" Copy-Item \"$env:LOCALAPPDATA\\Syncthing\\*\" \"$dir\\config\" -Exclude 'LOCK' -Recurse -Force",
"}"
],
"post_install": [
"info \"更新 SyncTrayzor 的 sything.\"",
"if (Test-Path \"$scoopdir\\persist\\SyncTrayzor\\data\\syncthing.exe.old\") {",
" Remove-Item \"$scoopdir\\persist\\SyncTrayzor\\data\\syncthing.exe.old\" -Force",
"}",
"if (Test-Path \"$scoopdir\\apps\\SyncTrayzor\\current\\syncthing.exe.old\") {",
" Remove-Item \"$scoopdir\\apps\\SyncTrayzor\\current\\syncthing.exe.old\" -Force",
"}",
"if (Test-Path \"$scoopdir\\apps\\SyncTrayzor\") {",
" Rename-Item \"$scoopdir\\persist\\SyncTrayzor\\data\\syncthing.exe\" \"$scoopdir\\persist\\SyncTrayzor\\data\\syncthing.exe.old\" -Force",
" Rename-Item \"$scoopdir\\apps\\SyncTrayzor\\current\\syncthing.exe\" \"$scoopdir\\apps\\SyncTrayzor\\current\\syncthing.exe.old\" -Force",
" Copy-Item \"$dir\\syncthing.exe\" \"$scoopdir\\persist\\SyncTrayzor\\data\\syncthing.exe\" -Force",
" Copy-Item \"$dir\\syncthing.exe\" \"$scoopdir\\apps\\SyncTrayzor\\current\\syncthing.exe\" -Force",
"}"
],
"persist": "config",
"checkver": {
"github": "https://github.com/syncthing/syncthing"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/syncthing/syncthing/releases/download/v$version/syncthing-windows-amd64-v$version.zip",
"extract_dir": "syncthing-windows-amd64-v$version"
}
},
"hash": {
"url": "$baseurl/sha256sum.txt.asc"
}
}
}