Skip to content

Commit 3262d19

Browse files
author
Friedrich Weinmann
committed
tweaking the copy procedure
1 parent e70c35b commit 3262d19

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

templates/build.ps1

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
[CmdletBinding()]
1212
param (
1313
[string]
14-
$Path,
15-
16-
[switch]
17-
$EnableBug
14+
$Path
1815
)
1916

2017
# Prepare working directories
@@ -68,14 +65,9 @@ while ($listToProcess)
6865
Write-PSFMessage -Level Verbose -Message "Copying from $($item.Name): $($_.FullName) to $($item.Parent)\$($item.Path)"
6966

7067
#TODO: Debug, delete it
71-
$global:transfers[$_.FullName] = "$($staging.FullName)\$($item.Parent)\$($item.Path)"
68+
$global:transfers[$_.FullName] = Join-Path (Join-Path $staging.FullName $item.Parent) $item.Path
7269

73-
if ($EnableBug) { Copy-Item $_.FullName -Destination "$($staging.FullName)\$($item.Parent)\$($item.Path)" -Force -Recurse }
74-
else
75-
{
76-
$destinationPath = "{0}\{1}\{2}" -f $staging.FullName, $item.Parent, $item.Path
77-
Copy-Item $_.FullName -Destination $destinationPath -Force -Recurse
78-
}
70+
Copy-Item $_.FullName -Destination $global:transfers[$_.FullName] -Force -Recurse
7971
}
8072
}
8173
$listToProcess = $listToProcess | Where-Object { $_ -notin $processingThisTime }

0 commit comments

Comments
 (0)