@@ -21,21 +21,22 @@ function CopyReadMe {
2121 # If set, overwrite the existing readme
2222 [Switch ]$Force
2323 )
24+ process {
25+ # Copy the readme file as an about_ help file
26+ Write-Verbose " Test for ReadMe: $Pwd \$ ( $ReadMe ) "
27+ if ($ReadMe -and (Test-Path $ReadMe - PathType Leaf)) {
28+ # Make sure there's a language path
29+ $LanguagePath = Join-Path $OutputDirectory $Culture
30+ if (! (Test-Path $LanguagePath - PathType Container)) {
31+ $null = New-Item $LanguagePath - Type Directory - Force
32+ }
33+ Write-Verbose " Copy ReadMe to: $LanguagePath "
2434
25- # Copy the readme file as an about_ help file
26- Write-Verbose " Test for ReadMe: $Pwd \$ ( $ReadMe ) "
27- if ($ReadMe -and (Test-Path $ReadMe - PathType Leaf)) {
28- # Make sure there's a language path
29- $LanguagePath = Join-Path $OutputDirectory $Culture
30- if (! (Test-Path $LanguagePath - PathType Container)) {
31- $null = New-Item $LanguagePath - Type Directory - Force
32- }
33- Write-Verbose " Copy ReadMe to: $LanguagePath "
34-
35- $about_module = Join-Path $LanguagePath " about_$ ( $ModuleName ) .help.txt"
36- if (! (Test-Path $about_module )) {
37- Write-Verbose " Turn readme into about_module"
38- Copy-Item - LiteralPath $ReadMe - Destination $about_module
35+ $about_module = Join-Path $LanguagePath " about_$ ( $ModuleName ) .help.txt"
36+ if (! (Test-Path $about_module )) {
37+ Write-Verbose " Turn readme into about_module"
38+ Copy-Item - LiteralPath $ReadMe - Destination $about_module - Force:$Force
39+ }
3940 }
4041 }
4142}
0 commit comments