2023-12-13 20:24:53 +00:00

47 lines
1.8 KiB
JSON

{
"version": "4.4.1",
"description": "Create and view interactive cheatsheets on the command-line",
"homepage": "https://github.com/cheat/cheat",
"license": "MIT",
"architecture": {
"64bit": {
"url": "https://github.com/cheat/cheat/releases/download/4.4.1/cheat-windows-amd64.exe.zip",
"hash": "2e5eb0ded38798541f96d459e7bd31bd6847132c5b3be85643c6609a3f8aed57"
}
},
"pre_install": [
"Rename-Item \"$dir\\cheat-windows-amd64.exe\" 'cheat.exe'",
"$file = 'conf.yml'",
"if (!(Test-Path \"$persist_dir\\$file\")) {",
" Write-Host 'File' $file 'does not exists. Creating.' -f Yellow",
" New-Item -ItemType File -Force -Path \"$dir\\$file\" | Out-Null",
"}",
"if (!(Test-Path \"$persist_dir\\cheatsheets\")) {",
" Write-Host 'Adding community cheatsheets...' -f Yellow",
" New-item -ItemType Directory -Force -Path \"$persist_dir\\cheatsheets\\personal\" | Out-Null",
" git clone -q 'https://github.com/cheat/cheatsheets.git' \"$persist_dir\\cheatsheets\\community\"",
"}"
],
"post_install": [
"$file = 'conf.yml'",
"$CONT = $(& \"$dir\\cheat\" --init) -replace 'editor: EDITOR_PATH', 'editor: notepad' -replace 'pager: PAGER_PATH', 'pager: more'",
"Set-Content \"$dir\\$file\" $CONT -Encoding ASCII"
],
"env_set": {
"CHEAT_CONFIG_PATH": "$dir\\conf.yml"
},
"bin": "cheat.exe",
"persist": [
"conf.yml",
"cheatsheets"
],
"checkver": "github",
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/cheat/cheat/releases/download/$version/cheat-windows-amd64.exe.zip"
}
}
}
}