2023-06-07 18:02:31 +00:00
|
|
|
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
|
|
|
|
2023-06-08 00:28:33 +00:00
|
|
|
$null = New-Module {
|
|
|
|
$path = "$env:LOCALAPPDATA/osu!";
|
|
|
|
$softwareName = "osu!";
|
|
|
|
$genericConfigName = "osu!.User.cfg";
|
|
|
|
|
2023-06-30 10:19:54 +00:00
|
|
|
function Backup-Osu([Context] $context) {
|
2023-06-30 12:23:20 +00:00
|
|
|
Write-Host "Backing up osu!";
|
2023-06-08 00:28:33 +00:00
|
|
|
$archive = $context.SoftwareArchive($softwareName);
|
2023-06-30 12:23:20 +00:00
|
|
|
Write-Information "Backing up important files";
|
2023-06-08 00:28:33 +00:00
|
|
|
$context.Backup($path, $archive, @("-i@`"$PSScriptRoot/include.txt`""));
|
2023-06-30 12:23:20 +00:00
|
|
|
Write-Information "Renaming user configuration to $genericConfigName";
|
2023-06-08 00:28:33 +00:00
|
|
|
& 7z rn "$archive" "osu!.$env:USERNAME.cfg" $genericConfigName;
|
|
|
|
}
|
2023-06-07 18:02:31 +00:00
|
|
|
}
|