Skip to content

Commit

Permalink
fix(powershell): resolves #10 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElrohirGT authored Dec 2, 2021
1 parent 3304bba commit 39c8789
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AdventOfCode/UserScripts/GenerateSolutionFiles.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ namespace AdventOfCode.Solutions.Year<YEAR>
"@

$newDirectory = Join-Path $PSScriptRoot ".." "Solutions" "Year$Year"
$newDirectory = [IO.Path]::Combine($PSScriptRoot, "..", "Solutions", "Year$Year")

if(!(Test-Path $newDirectory)) {
New-Item $newDirectory -ItemType Directory | Out-Null
}

for($i = 1; $i -le 25; $i++) {
$newFile = Join-Path $newDirectory "Day$("{0:00}" -f $i)" "Day$("{0:00}" -f $i).cs"
$newFile = [IO.Path]::Combine($newDirectory, "Day$("{0:00}" -f $i)", "Day$("{0:00}" -f $i).cs")
if(!(Test-Path $newFile)) {
New-Item $newFile -ItemType File -Value ($template -replace "<YEAR>", $Year -replace "<DAY>", "$("{0:00}" -f $i)") -Force | Out-Null
}
Expand Down

0 comments on commit 39c8789

Please sign in to comment.