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

24 lines
713 B
PowerShell
Raw Normal View History

2023-06-07 20:52:34 +00:00
. "$PSScriptRoot/../../Scripts/Context.ps1";
2023-06-07 20:58:42 +00:00
2023-06-08 00:28:33 +00:00
$null = New-Module {
2023-06-30 10:19:54 +00:00
function Backup-Git([Context] $context) {}
2023-06-22 18:44:40 +00:00
2023-06-30 10:19:54 +00:00
function Restore-Git([Context] $context) {
Write-Host "Restoring git";
2023-06-22 19:23:36 +00:00
$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";
2023-06-22 19:23:36 +00:00
Start-Process -Wait $script;
Remove-Item $script;
2023-06-22 18:44:40 +00:00
}
2023-06-08 00:28:33 +00:00
}