PortValhalla/scripts/Windows/Software/git/Manage.ps1

20 lines
No EOL
571 B
PowerShell

. "$PSScriptRoot/../../Scripts/Context.ps1";
$null = New-Module {
function Backup-Git([Context] $context) {}
function Restore-Git([Context] $context) {
$script = New-TemporaryFile;
$script = Rename-Item $script "$($script.Name).sh" -PassThru;
Set-Content $script (
[string]::Join(
"`n",
@(
"bash `"$PSScriptRoot/../../../Common/Config/git/install.sh`"",
"bach rm ~/.bashrc")));
Start-Process -Wait $script;
Remove-Item $script;
}
}