fix(scoop): add executables to PATH

resolves #449
This commit is contained in:
Jan De Dobbeleer 2021-02-24 12:10:47 +01:00 committed by Jan De Dobbeleer
parent 58f1789415
commit 7377f31d70
3 changed files with 9 additions and 9 deletions

3
.gitignore vendored
View file

@ -150,5 +150,8 @@ dist
# linux binary # linux binary
/src/oh-my-posh /src/oh-my-posh
package/
bin/ bin/
Output/ Output/
*.sha256
*.7z

View file

@ -5,16 +5,16 @@ Param
$Version $Version
) )
New-Item -Path "." -Name "bin" -ItemType Directory New-Item -Path "." -Name "package/bin" -ItemType Directory
Copy-Item -Path "../../themes" -Destination "./bin" -Recurse Copy-Item -Path "../../themes" -Destination "./package" -Recurse
# Download the files and pack them # Download the files and pack them
@{name = 'posh-windows-amd64.exe'; outName = 'oh-my-posh.exe' }, @{name = 'posh-linux-amd64'; outName = 'oh-my-posh-wsl' } | ForEach-Object -Process { @{name = 'posh-windows-amd64.exe'; outName = 'oh-my-posh.exe' }, @{name = 'posh-linux-amd64'; outName = 'oh-my-posh-wsl' } | ForEach-Object -Process {
$download = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$Version/$($_.name)" $download = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$Version/$($_.name)"
Invoke-WebRequest $download -Out "./bin/$($_.outName)" Invoke-WebRequest $download -Out "./package/bin/$($_.outName)"
} }
$compress = @{ $compress = @{
Path = "./bin/*" Path = "./package/*"
CompressionLevel = "Fastest" CompressionLevel = "Fastest"
DestinationPath = "./posh-windows-wsl-amd64.7z" DestinationPath = "./posh-windows-wsl-amd64.7z"
} }
@ -26,4 +26,4 @@ $content = $content.Replace('<HASH>', $zipHash.Hash)
$content | Out-File -Encoding 'UTF8' './oh-my-posh.json' $content | Out-File -Encoding 'UTF8' './oh-my-posh.json'
$zipHash.Hash | Out-File -Encoding 'UTF8' 'posh-windows-wsl-amd64.7z.sha256' $zipHash.Hash | Out-File -Encoding 'UTF8' 'posh-windows-wsl-amd64.7z.sha256'
Remove-Item ./bin/ -Recurse Remove-Item ./package/ -Recurse

View file

@ -12,10 +12,7 @@
"hash": "<HASH>" "hash": "<HASH>"
} }
}, },
"bin": [ "env_add_path": "bin",
"oh-my-posh-wsl",
"oh-my-posh.exe"
],
"checkver": { "checkver": {
"github": "https://github.com/JanDeDobbeleer/oh-my-posh" "github": "https://github.com/JanDeDobbeleer/oh-my-posh"
}, },