Files
RedditVideoMakerBot/utils/envUpdateWin.ps1
T
owengaspard ddc402c48d Added Windows support
I have added Windows support using PowerShell. I made a script that does effectively what the GNU awk and grep commands do but in PowerShell for Windows compatibility.
2022-06-18 17:16:07 -05:00

9 lines
404 B
PowerShell

$envFile = Get-Content ".\.env.template"
$envFile -split "=" | Where-Object {$_ -notmatch '\"'} | Set-Content ".\envVarsbefSpl.txt"
Get-Content ".\envVarsbefSpl.txt" | Where-Object {$_ -notmatch '\#'} | Set-Content ".\envVarsN.txt"
Get-Content ".\envVarsN.txt" | Where-Object {$_ -ne ''} | Set-Content ".\envVars.txt"
Remove-Item ".\envVarsbefSpl.txt"
Remove-Item ".\envVarsN.txt"
Write-Host $nowSplit