-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathreorder-sln.ps1
More file actions
34 lines (28 loc) · 917 Bytes
/
reorder-sln.ps1
File metadata and controls
34 lines (28 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$content = Get-Content "NuklearDotNetDotnet.sln"
$newContent = @()
$raylibLines = @()
$skipNext = $false
for ($i = 0; $i -lt $content.Length; $i++) {
$line = $content[$i]
# Check if this is the Raylib project line
if ($line -match 'Example_Raylib.*Example_RaylibDotnet\.csproj') {
$raylibLines += $line
$skipNext = $true
continue
}
# Skip the EndProject after Raylib
if ($skipNext -and $line -eq "EndProject") {
$raylibLines += $line
$skipNext = $false
continue
}
# Insert Raylib before Example_SFML
if ($line -match 'Example_SFML.*Example_SFMLDotnet\.csproj') {
foreach ($rl in $raylibLines) {
$newContent += $rl
}
}
$newContent += $line
}
$newContent | Set-Content "NuklearDotNetDotnet.sln"
Write-Host "Solution reordered - Example_Raylib is now the first example project"