mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2025-12-11 10:35:44 +00:00
* 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>
29 lines
714 B
PowerShell
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
|