mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-05-01 03:00:26 -04:00
* powershell -> 7.6.1 in updater-powershell-7.6.1 * updater-powershell-7.6.1: Package File Update Run on linux/amd64 container. * updater-powershell-7.6.1: Package File Update Run on linux/arm/v7 container. --------- Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com> Co-authored-by: chromebrew-actions[bot] <chromebrew-actions[bot]@users.noreply.github.com>
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.6.1'
|
|
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: '50e3b4a3b36a61720abe92decda8c518c784b76d9371c8c32ae481566d5cf076',
|
|
armv7l: '50e3b4a3b36a61720abe92decda8c518c784b76d9371c8c32ae481566d5cf076',
|
|
x86_64: 'dfc94229767921603f7c3e1cb1ac5aa931448af7496ccf657723b6278057c415'
|
|
})
|
|
|
|
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
|