Brian 7e2e4d7b4a
bat: Persist configs (#6422)
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
2025-01-04 21:27:48 +08:00

56 lines
2.1 KiB
JSON

{
"version": "0.24.0",
"description": "A cat(1) clone with syntax highlighting and Git integration",
"homepage": "https://github.com/sharkdp/bat",
"license": "Apache-2.0",
"suggest": {
"vcredist": "extras/vcredist2022",
"less": "less"
},
"architecture": {
"64bit": {
"url": "https://github.com/sharkdp/bat/releases/download/v0.24.0/bat-v0.24.0-x86_64-pc-windows-msvc.zip",
"hash": "1aa3733479d5980cb58c2b06aca06cf19ff377e85622f96549f8849f47f9f486",
"extract_dir": "bat-v0.24.0-x86_64-pc-windows-msvc"
},
"32bit": {
"url": "https://github.com/sharkdp/bat/releases/download/v0.24.0/bat-v0.24.0-i686-pc-windows-msvc.zip",
"hash": "447f48b37df08cfc643b05e3e85ee8470eb8db5adcf96d8ecd405e90d2d92df5",
"extract_dir": "bat-v0.24.0-i686-pc-windows-msvc"
}
},
"pre_install": [
"if (!(Test-Path \"$persist_dir\\config\")) {",
" Copy-Item -ErrorAction Ignore \"$env:APPDATA\\bat\\config\" \"$dir\\config\"",
" New-Item -ErrorAction Ignore \"$dir\\config\" | Out-Null",
"}",
"'syntaxes', 'themes' | ForEach-Object {",
" if (!(Test-Path \"$persist_dir\\$_\")) {",
" Copy-Item -ErrorAction Ignore -Recurse \"$env:APPDATA\\bat\\$_\" \"$dir\\$_\"",
" }",
"}"
],
"env_set": {
"BAT_CONFIG_DIR": "$dir"
},
"persist": [
"config",
"syntaxes",
"themes"
],
"bin": "bat.exe",
"checkver": "github",
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/sharkdp/bat/releases/download/v$version/bat-v$version-x86_64-pc-windows-msvc.zip",
"extract_dir": "bat-v$version-x86_64-pc-windows-msvc"
},
"32bit": {
"url": "https://github.com/sharkdp/bat/releases/download/v$version/bat-v$version-i686-pc-windows-msvc.zip",
"extract_dir": "bat-v$version-i686-pc-windows-msvc"
}
}
}
}