PowerShell_Scripts/base/Get-MyPackages.ps1
lksz 42b39f4e25 Introducing Packages
Major Overhaul with Breaking Changes
split into packaged, default behavior moved into 'base' package
each package has a json package description file with criteria for
loading

Modified Setup-Profile to refer to 'base' package path for auto loading

moved Linux aliases and command to 'base.linux' package
created 'docker' package to address docker supported systems

modified Get-MyScripts, Edit-MyScripts and Reload-MyScripts accordingly.

Dropped -System and sys.*, package json conditions will take care of it.

Supplied command to create/edit package json files:
  - New-MyPackage
  - Add-PackageCondition
  - Set-MyPackage
2020-11-25 00:46:33 -05:00

21 行
564 B
PowerShell

[CmdletBinding()]param(
[Parameter(ParameterSetName="OptionA")]
[Parameter(ParameterSetName="Path")]
[switch]$Force,
[Parameter(ParameterSetName="Path",Mandatory)]
[switch]$ReturnFullPath,
[Parameter(ParameterSetName="Path")]
[switch]$IncludeRoot
)
$local:packages = [Packagesz]::_GetValidValues("", -not $Force, $true) | Sort-Object
if( $IncludeRoot -and $ReturnFullPath ) { $MyPSScriptRoot }
foreach ( $local:pkg in $packages ) {
if( $ReturnFullPath ) {
Join-Path $MyPSScriptRoot $pkg
} else {
$pkg
}
}