Create a separate script for WSL interaction
This commit is contained in:
parent
c350a9c26b
commit
380b70322c
4 changed files with 29 additions and 11 deletions
scripts/Windows/Scripts
25
scripts/Windows/Scripts/WSL.ps1
Normal file
25
scripts/Windows/Scripts/WSL.ps1
Normal file
|
@ -0,0 +1,25 @@
|
|||
$null = New-Module {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets the name of the WSL distribution used for managing the configuration.
|
||||
#>
|
||||
function Get-DistributionName {
|
||||
return "ValhallaUbuntu";
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets the path to the directory containing the WSL distribution.
|
||||
#>
|
||||
function Get-DistributionPath {
|
||||
return "$env:ProgramData/PortValhalla/$distribution";
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets the path to the virtual hard disk of the WSL distribution.
|
||||
#>
|
||||
function Get-DistributionDisk {
|
||||
return "$(Get-DistributionPath)/ext4.vhdx";
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue