blob: 9dff1c568fa178fd446d0874f3d4eefd29146c4a (
plain) (
blame)
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
|
$tempDir = "./run_script_temp"
$repoDir = "$tempDir/run"
Write-Host "Creating temporary directory..."
$null = New-Item -ItemType Directory -Path $tempDir -Force
Write-Host "Cloning https://github.com/catilgrass/run ..."
git clone "https://github.com/catilgrass/run" $repoDir
Write-Host "Installing files..."
Copy-Item -Path "$repoDir/run.sh" -Destination (Get-Location) -Force
Copy-Item -Path "$repoDir/run.ps1" -Destination (Get-Location) -Force
Copy-Item -Path "$repoDir/.run" -Destination (Get-Location) -Recurse -Force
Write-Host "Cleaning up..."
[System.GC]::Collect()
Start-Sleep -Milliseconds 200
Remove-Item -Path $tempDir -Recurse -Force
Write-Host "Done!"
Write-Host ""
$response = Read-Host "Remove all example scripts? [Y/n]"
if ($response -notmatch '^[nN]') {
Write-Host "Removing example scripts..."
Remove-Item -Path ".run/src/bin/*" -Force
Write-Host "Done!"
} else {
Write-Host "Skipped."
}
|