25 lines
726 B
PowerShell
25 lines
726 B
PowerShell
#!/bin/pwsh
|
|
. "$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;
|
|
}
|
|
}
|