mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-05-25 06:12:26 -06:00
45 lines
1.2 KiB
Ruby
45 lines
1.2 KiB
Ruby
cask "powershell-preview" do
|
|
arch = Hardware::CPU.intel? ? "x64" : "arm64"
|
|
|
|
version "7.3.0-preview.6"
|
|
|
|
if Hardware::CPU.intel?
|
|
sha256 "0dea0a5d96f182198608d82f27d73b17f1a57ed4d3d1e90277e643661960b212"
|
|
else
|
|
sha256 "2dbac96123fc40a9417e6ad0d6fb06a7bda3c326e1a7a4e1cc710d476e96028a"
|
|
end
|
|
|
|
url "https://github.com/PowerShell/PowerShell/releases/download/v#{version}/powershell-#{version}-osx-#{arch}.pkg"
|
|
name "PowerShell"
|
|
desc "Command-line shell and scripting language"
|
|
homepage "https://github.com/PowerShell/PowerShell"
|
|
|
|
livecheck do
|
|
url :url
|
|
regex(/^v?(\d+(?:\.\d+)+[_-](?:preview|rc)(?:\.\d+)?)$/i)
|
|
end
|
|
|
|
depends_on formula: "openssl"
|
|
depends_on macos: ">= :mojave"
|
|
|
|
pkg "powershell-#{version}-osx-#{arch}.pkg"
|
|
|
|
uninstall pkgutil: "com.microsoft.powershell-preview"
|
|
|
|
zap trash: [
|
|
"~/.cache/powershell",
|
|
"~/.config/PowerShell",
|
|
"~/.local/share/powershell",
|
|
],
|
|
rmdir: [
|
|
"~/.cache",
|
|
"~/.config",
|
|
"~/.local",
|
|
"~/.local/share",
|
|
]
|
|
|
|
caveats <<~EOS
|
|
To use Homebrew in PowerShell, set:
|
|
Add-Content -Path $PROFILE.CurrentUserAllHosts -Value '$(#{HOMEBREW_PREFIX}/bin/brew shellenv) | Invoke-Expression'
|
|
EOS
|
|
end
|