Rename variables properly
This commit is contained in:
parent
36a663b897
commit
abcaf0ef99
1 changed files with 3 additions and 3 deletions
|
@ -18,11 +18,11 @@ $Global:SetupConfigPostprocessor = {
|
||||||
$winPartition = ($partitionCreations | Select-Object -Last 1);
|
$winPartition = ($partitionCreations | Select-Object -Last 1);
|
||||||
$newPartition = $winPartition.CloneNode($true);
|
$newPartition = $winPartition.CloneNode($true);
|
||||||
|
|
||||||
$offset = 0;
|
$garbage = 0;
|
||||||
|
|
||||||
foreach ($partition in $partitionCreations) {
|
foreach ($partition in $partitionCreations) {
|
||||||
$order = [int]$partition.SelectSingleNode("./ua:Order", $namespace).InnerText;
|
$order = [int]$partition.SelectSingleNode("./ua:Order", $namespace).InnerText;
|
||||||
$offset += [int]$partition.SelectSingleNode("./ua:Size", $namespace).InnerText;
|
$garbage += [int]$partition.SelectSingleNode("./ua:Size", $namespace).InnerText;
|
||||||
$newOrder = $order;
|
$newOrder = $order;
|
||||||
|
|
||||||
if ($order -eq 2) {
|
if ($order -eq 2) {
|
||||||
|
@ -44,7 +44,7 @@ $Global:SetupConfigPostprocessor = {
|
||||||
|
|
||||||
# Add space before Windows installation... wha-!? For Linux, ofc! I use Arch Linux, btw.
|
# Add space before Windows installation... wha-!? For Linux, ofc! I use Arch Linux, btw.
|
||||||
$size = $winPartition.OwnerDocument.CreateElement("Size");
|
$size = $winPartition.OwnerDocument.CreateElement("Size");
|
||||||
$size.InnerText = "$((1 * 1024 * 1024) - $offset)";
|
$size.InnerText = "$((1 * 1024 * 1024) - $garbage)";
|
||||||
$winPartition.RemoveChild($winPartition.SelectSingleNode("./ua:Extend", $namespace));
|
$winPartition.RemoveChild($winPartition.SelectSingleNode("./ua:Extend", $namespace));
|
||||||
$winPartition.AppendChild($size);
|
$winPartition.AppendChild($size);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue