Create proper relative paths by default

This commit is contained in:
Manuel Thalmann 2024-03-21 16:05:55 +01:00
parent a8a144c147
commit b1aa93d420
4 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
#!/bin/pwsh
$env:WIN_COMPUTER_NAME = "DerGeret";
$env:SETUP_SCRIPT_NAME = [System.IO.Path]::GetRelativePath("$PSScriptRoot/../../..", "$PSScriptRoot/Restore.ps1");
$env:SETUP_SCRIPT_NAME = "$PSScriptRoot/Restore.ps1";
$Global:SetupConfigPostprocessor = {
param([xml] $config, [System.Xml.XmlNamespaceManager] $namespace)

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
$env:WIN_COMPUTER_NAME ??= "win11";
$env:SETUP_SCRIPT_NAME ??= [System.IO.Path]::GetRelativePath("$PSScriptRoot/../../..", "$PSScriptRoot/Install.ps1");
$env:SETUP_SCRIPT_NAME ??= "$PSScriptRoot/Install.ps1";
. "$PSScriptRoot/../../../scripts/Windows/OS/Setup.ps1";

View file

@ -1,4 +1,4 @@
#!/bin/pwsh
$env:SETUP_SCRIPT_NAME ??= [System.IO.Path]::GetRelativePath("$PSScriptRoot/../../..", "$PSScriptRoot/Install.ps1");
$env:SETUP_SCRIPT_NAME ??= "$PSScriptRoot/Install.ps1";
. "$PSScriptRoot/../../Generic/Windows/Setup.ps1";

View file

@ -37,7 +37,7 @@ $newCommand = $installationCommand.ParentNode.AppendChild($installationCommand.C
$newCommand.SelectSingleNode("./ua:CommandLine", $namespace).InnerText = `
"powershell -Command " + `
$(Get-Content "$PSScriptRoot/InitialBoot.ps1") + `
"; pwsh '$env:SETUP_SCRIPT_NAME';";
"; pwsh '$([System.IO.Path]::GetRelativePath("$PSScriptRoot/../../..", $env:SETUP_SCRIPT_NAME))';";
$order = [int]$newCommand.SelectSingleNode("./ua:Order", $namespace).InnerText;
$newCommand.SelectSingleNode("./ua:Order", $namespace).InnerText = $order + 1;