-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmake.ps1
31 lines (30 loc) · 850 Bytes
/
make.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
function Exists-Item {
param(
[Parameter(Mandatory=$true, Position=1)]
$item,
[Parameter(Mandatory=$false, Position=2)]
$Yes,
[Parameter(Mandatory=$false, Position=3)]
$No,
[Parameter(Mandatory=$false, Position=4)]
$Always
)
if ((Get-Item $item -ea si) -ne $null) {
if ($Yes -ne $null) {
$item | &{ PROCESS { &$Yes } }
}
} else {
if ($No -ne $null) {
$item | &{ PROCESS { &$No } }
}
}
if ($Always -ne $null) {
$item | &{ PROCESS { &$Always } }
}
}
Exists-Item .\Output { Remove-Item -Recurse -Force $_ } -Always { mkdir $_ }
.\OnRamper\OnRamper\bin\debug\Onramper.exe `
--source=.\Template `
--destination=.\Output `
--config=.\Config `
--execute=.\Onramper\.nuget\nuget.exe