forked from netchx/netch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeps.ps1
38 lines (31 loc) · 901 Bytes
/
deps.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
param (
[string]
$OutputPath = 'release'
)
if ( -Not (Test-Path -Path "$OutputPath") ) {
New-Item -ItemType Directory -Name "$OutputPath" | Out-Null
}
Push-Location "$OutputPath"
New-Item -ItemType Directory -Name 'bin' | Out-Null
New-Item -ItemType Directory -Name 'mode' | Out-Null
New-Item -ItemType Directory -Name 'i18n' | Out-Null
# Get-ChildItem -Path '..\scripts\deps\main' -File | ForEach-Object {
# $name=$_.Name
# Write-Host "Executing $name"
# & "..\scripts\deps\base\$name"
# if ( -Not $? ) {
# Pop-Location
# exit $lastExitCode
# }
# }
Get-ChildItem -Path '..\scripts\deps' -File | ForEach-Object {
$name=$_.Name
Write-Host "Executing $name"
& "..\scripts\deps\$name" -OutputPath 'bin'
if ( -Not $? ) {
Pop-Location
exit $lastExitCode
}
}
Pop-Location
exit 0