Files
winutil/Compile.ps1
T

36 lines
1.6 KiB
PowerShell
Raw Normal View History

+3
2023-03-07 12:28:00 -08:00
$OFS = "`r`n"
$scriptname = "winutil.ps1"
2023-07-13 15:46:00 -05:00
if (Test-Path -Path "$($scriptname)")
{
Remove-Item -Force "$($scriptname)"
}
+3
2023-03-07 12:28:00 -08:00
Write-output '
################################################################################################################
### ###
### WARNING: This file is automatically generated DO NOT modify this file directly as it will be overwritten ###
### ###
################################################################################################################
' | Out-File ./$scriptname -Append -Encoding ascii
2024-01-15 11:32:19 -06:00
(Get-Content .\scripts\start.ps1).replace('#{replaceme}',"$(Get-Date -Format yy.MM.dd)") | Out-File ./$scriptname -Append -Encoding ascii
+3
2023-03-07 12:28:00 -08:00
Get-ChildItem .\functions -Recurse -File | ForEach-Object {
Get-Content $psitem.FullName | Out-File ./$scriptname -Append -Encoding ascii
}
Get-ChildItem .\xaml | ForEach-Object {
$xaml = (Get-Content $psitem.FullName).replace("'","''")
2024-01-15 11:32:19 -06:00
Write-output "`$$($psitem.BaseName) = '$xaml'" | Out-File ./$scriptname -Append -Encoding ascii
+3
2023-03-07 12:28:00 -08:00
}
Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
$json = (Get-Content $psitem.FullName).replace("'","''")
2023-10-19 17:12:55 -05:00
+3
2023-03-07 12:28:00 -08:00
Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" | Out-File ./$scriptname -Append -Encoding ascii
}
Get-Content .\scripts\main.ps1 | Out-File ./$scriptname -Append -Encoding ascii