24 lines
No EOL
713 B
PowerShell
24 lines
No EOL
713 B
PowerShell
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
|
|
|
$null = New-Module {
|
|
function Backup-Git([Context] $context) {}
|
|
|
|
function Restore-Git([Context] $context) {
|
|
Write-Host "Restoring git";
|
|
$script = New-TemporaryFile;
|
|
$script = Rename-Item $script "$($script.Name).sh" -PassThru;
|
|
|
|
Write-Information "Preparing setup script";
|
|
|
|
Set-Content $script (
|
|
[string]::Join(
|
|
"`n",
|
|
@(
|
|
"bash `"$PSScriptRoot/../../../Common/Config/git/install.sh`"",
|
|
"bach rm ~/.bashrc")));
|
|
|
|
Write-Information "Running prepared script";
|
|
Start-Process -Wait $script;
|
|
Remove-Item $script;
|
|
}
|
|
} |