Create a separate script for WSL interaction

This commit is contained in:
Manuel Thalmann 2024-08-26 23:33:46 +02:00
parent c350a9c26b
commit 380b70322c
4 changed files with 29 additions and 11 deletions
scripts/Windows/Scripts

View 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";
}
};