Add a script for installing osu!lazer
This commit is contained in:
parent
1f41450a0a
commit
e416032f28
2 changed files with 16 additions and 0 deletions
|
@ -35,4 +35,5 @@ function Restore-PersonalApps([Context] $context) {
|
|||
Restore-TmUnited $context;
|
||||
Restore-ManiaPlanet $context;
|
||||
Restore-Osu $context;
|
||||
Restore-OsuLazer $context;
|
||||
}
|
||||
|
|
|
@ -8,4 +8,19 @@ $null = New-Module {
|
|||
Write-Host "Backing up osu!lazer";
|
||||
$context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"", "-i!*.realm", "-i!*.db"));
|
||||
}
|
||||
|
||||
function Restore-OsuLazer([Context] $context) {
|
||||
Write-Host "Restoring osu!lazer";
|
||||
Write-Information "Restoring files";
|
||||
$context.Restore($context.SoftwareArchive($softwareName), $path);
|
||||
Write-Information "Installing osu!lazer";
|
||||
|
||||
$installerName = "osu!lazer.exe";
|
||||
$tempDir = $context.GetTempDirectory();
|
||||
Push-Location $tempDir;
|
||||
Invoke-WebRequest "https://github.com/ppy/osu/releases/latest/download/install.exe" -OutFile $installerName;
|
||||
Start-Process -Wait -FilePath $installerName;
|
||||
Pop-Location;
|
||||
Remove-Item -Recurse $tempDir;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue