Skip to content
Snippets Groups Projects
Commit a2dd1b45 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Improve name of variable.

parent 08f53643
No related branches found
No related tags found
No related merge requests found
......@@ -41,18 +41,18 @@ function Start-MyService {
}
function Copy-FileIfNew([string]$SourcePath, [string]$Destination) {
# SourcePath is expected to be a FILE name
function Copy-FileIfNew([string]$SourceFile, [string]$Destination) {
# SourceFile is expected to be a FILE name
# Destination is expected to be a PATH
if (Test-Path "$Destination\$SourcePath") {
if (Test-Path "$Destination\$SourceFile") {
return
}
try {
Copy-Item -Path $SourcePath -Destination $Destination -ErrorAction Stop
Copy-Item -Path $SourceFile -Destination $Destination -ErrorAction Stop
}
catch {
$ex = $_.Exception
Write-Host "Copying $($SourcePath) FAILED!" -Fore Red
Write-Host "Copying $($SourceFile) FAILED!" -Fore Red
Write-Host $ex.Message
Exit
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment