mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 13:04:04 -08:00
25 lines
720 B
PowerShell
25 lines
720 B
PowerShell
Param
|
|
(
|
|
[parameter(Mandatory = $true)]
|
|
[string]
|
|
$Version,
|
|
[parameter(Mandatory = $true)]
|
|
[string]
|
|
$LinuxSHA,
|
|
[parameter(Mandatory = $true)]
|
|
[string]
|
|
$WindowsSHA,
|
|
[parameter(Mandatory = $true)]
|
|
[string]
|
|
$ThemesSHA
|
|
)
|
|
|
|
$content = Get-Content '.\oh-my-posh.json' -Raw
|
|
$content = $content.Replace('<VERSION>', $Version)
|
|
$content = $content.Replace('<HASH_LINUX>', $LinuxSHA)
|
|
$content = $content.Replace('<HASH_WINDOWS>', $WindowsSHA)
|
|
$fileHash = Get-FileHash post-install.ps1 -Algorithm SHA256
|
|
$content = $content.Replace('<HASH_INSTALL_SCRIPT>', $fileHash.Hash)
|
|
$content = $content.Replace('<HASH_THEMES>', $ThemesSHA)
|
|
$content | Out-File -Encoding 'UTF8' '.\oh-my-posh.json'
|