mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-06 22:24:12 -05:00
38 lines
1.5 KiB
Ruby
38 lines
1.5 KiB
Ruby
require 'package'
|
|
|
|
class Powershell < Package
|
|
description 'Powershell is a cross-platform, task-based command-line shell and scripting language that helps rapidly automate tasks that manage operating systems and processes'
|
|
homepage 'https://learn.microsoft.com/en-us/powershell/'
|
|
version '7.5.4'
|
|
license 'MIT'
|
|
compatibility 'aarch64 armv7l x86_64'
|
|
min_glibc '2.34'
|
|
|
|
source_url({
|
|
aarch64: "https://github.com/PowerShell/PowerShell/releases/download/v#{version}/powershell-#{version}-linux-arm32.tar.gz",
|
|
armv7l: "https://github.com/PowerShell/PowerShell/releases/download/v#{version}/powershell-#{version}-linux-arm32.tar.gz",
|
|
x86_64: "https://github.com/PowerShell/PowerShell/releases/download/v#{version}/powershell-#{version}-linux-x64.tar.gz"
|
|
})
|
|
source_sha256({
|
|
aarch64: '3553be9a484ec9627c7ad70debc62a39ecf96814d76513cc9c77acae9e5b3ecd',
|
|
armv7l: '3553be9a484ec9627c7ad70debc62a39ecf96814d76513cc9c77acae9e5b3ecd',
|
|
x86_64: '1fd7983fe56ca9e6233f126925edb24bf6b6b33e356b69996d925c4db94e2fef'
|
|
})
|
|
|
|
depends_on 'xdg_base'
|
|
|
|
no_compile_needed
|
|
no_shrink
|
|
|
|
def self.install
|
|
FileUtils.mkdir_p %W[#{CREW_DEST_PREFIX}/bin #{CREW_DEST_PREFIX}/share/powershell]
|
|
FileUtils.cp_r Dir['*'], "#{CREW_DEST_PREFIX}/share/powershell"
|
|
FileUtils.chmod 0o755, "#{CREW_DEST_PREFIX}/share/powershell/pwsh"
|
|
FileUtils.ln_s "#{CREW_PREFIX}/share/powershell/pwsh", "#{CREW_DEST_PREFIX}/bin/pwsh"
|
|
end
|
|
|
|
def self.postinstall
|
|
ExitMessage.add "\nTo get started, execute 'pwsh'.\n"
|
|
end
|
|
end
|