Skip to content

Commit cc91118

Browse files
author
Andrew Omondi
committed
chore: an attempt at fixing this
1 parent 1b83b14 commit cc91118

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

scripts/copyFilesOnBuild.ps1

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
<#
5+
.Synopsis
6+
Copy files to a new location that is the parent of the current directory.
7+
.Description
8+
Receives an encoded string value and decodes it using base64.
9+
Write the new decoded string to a local file for later consumption.
10+
.Parameter inputPath
11+
The encoded string we wish to decode.
12+
#>
13+
14+
Param(
15+
[Parameter(Mandatory = $true)][string]$inputPath
16+
)
17+
18+
$parentDirectory = (Get-Item $inputPath).Parent
19+
Push-Location $inputPath
20+
21+
Get-ChildItem '*' -Filter *.java -recurse | ForEach-Object {
22+
$TargetDirectory = $_.DirectoryName.Replace($inputPath, "")
23+
$TargetPath = Join-Path -Path $parentDirectory -ChildPath $TargetDirectory
24+
If (!(Test-Path $TargetPath)) {
25+
mkdir $TargetPath | out-null
26+
}
27+
$_ | Move-Item -Destination $TargetPath -Force
28+
}
29+
Pop-Location

0 commit comments

Comments
 (0)