mirror of
https://github.com/ScoopInstaller/Main.git
synced 2026-02-24 04:14:41 +00:00
50 lines
2.0 KiB
JSON
50 lines
2.0 KiB
JSON
{
|
|
"version": "5.1.0",
|
|
"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/5.1.0/cheat-windows-amd64.exe.zip",
|
|
"hash": "a7fbdb2c02d575c2d75aa350ac25006699586edccbfce2304a01b5f518e06b80"
|
|
}
|
|
},
|
|
"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": [
|
|
"# For the cheatsheets path to be set correctly, the configuration file should be initialized after the environment variables are set.",
|
|
"$file = 'conf.yml'",
|
|
"if ((Get-Item \"$dir\\$file\").Length -eq 0) {",
|
|
" $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"
|
|
}
|
|
}
|
|
}
|
|
}
|