-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.ps1
More file actions
28 lines (20 loc) · 687 Bytes
/
Copy pathmain.ps1
File metadata and controls
28 lines (20 loc) · 687 Bytes
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
param (
[string]$shell,
[string]$workflow
)
$scriptdir = $PSScriptRoot
$shellcmd = $shell
$shellcmd = $shellcmd -replace [RegEx]::Escape("{0}"), "$scriptdir\$workflow"
$shellcmd = $shellcmd -Split " "
$shell = $shellcmd[0]
$shellargs = $shellcmd[1..$shellcmd.Length]
$shell = $shell -replace "bash", "c:\program files\git\usr\bin\bash.exe"
$hosthome = $args[0]
$jobdir = $args[1]
$jobdir = $jobdir -replace $hosthome, $env:USERPROFILE
$jobdir = $jobdir -replace "/", "\"
cd C:\Users\vagrant
New-Item -ItemType SymbolicLink -Path "source" -Target $jobdir
Write-Host "Working directory: $jobdir"
$env:PATH = "`"C:\program files\git\usr\bin`";$env:PATH"
& $shell $shellargs