Files
Scoop/libexec/scoop-depends.ps1
Rashil Gandhi 7a599f062f feat(install): Add support for ARM64 architecture (#5154)
* Initial support for ARMv8

* Add fallback mechanism

* Update changelog

* Update useragent

* Some typo and format changes

* Use `env:ProgramFiles(Arm)` to detect ARM64

- Move `default_architecture()` to `core.ps1`

* Rename 'ensure_architecture()' and 'default_architecture()'

* Refactor 'supports_architecture()' to 'Get-SupportedArchitecture()'

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
2022-09-28 04:19:03 +05:30

29 lines
714 B
PowerShell

# Usage: scoop depends <app>
# Summary: List dependencies for an app, in the order they'll be installed
. "$PSScriptRoot\..\lib\getopt.ps1"
. "$PSScriptRoot\..\lib\depends.ps1" # 'Get-Dependency'
. "$PSScriptRoot\..\lib\manifest.ps1" # 'Get-Manifest' (indirectly)
$opt, $apps, $err = getopt $args 'a:' 'arch='
$app = $apps[0]
if(!$app) { error '<app> missing'; my_usage; exit 1 }
$architecture = Get-DefaultArchitecture
try {
$architecture = Format-ArchitectureString ($opt.a + $opt.arch)
} catch {
abort "ERROR: $_"
}
$deps = @()
Get-Dependency $app $architecture | ForEach-Object {
$dep = [ordered]@{}
$dep.Source, $dep.Name = $_ -split '/'
$deps += [PSCustomObject]$dep
}
$deps
exit 0