From 55d2beadae4a45ddcbd9a997abb7662e0569433d Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 7 Jun 2023 20:02:31 +0200 Subject: [PATCH] Add script for backing up osu! --- scripts/Windows/Software/osu!/Manage.ps1 | 10 ++++++++++ scripts/Windows/Software/osu!/include.txt | 3 +++ 2 files changed, 13 insertions(+) create mode 100644 scripts/Windows/Software/osu!/Manage.ps1 create mode 100644 scripts/Windows/Software/osu!/include.txt diff --git a/scripts/Windows/Software/osu!/Manage.ps1 b/scripts/Windows/Software/osu!/Manage.ps1 new file mode 100644 index 00000000..f158db92 --- /dev/null +++ b/scripts/Windows/Software/osu!/Manage.ps1 @@ -0,0 +1,10 @@ +. "$PSScriptRoot/../../Scripts/Context.ps1"; +$path = "$env:LOCALAPPDATA/osu!"; +$softwareName = "osu!"; +$genericConfigName = "osu!.User.cfg"; + +function Invoke-BackupOsu([Context] $context) { + $archive = $context.SoftwareArchive($softwareName); + $context.Backup($path, $archive, @("-i@`"$PSScriptRoot/include.txt`"")); + & 7z rn "$archive" "osu!.$env:USERNAME.cfg" $genericConfigName; +} diff --git a/scripts/Windows/Software/osu!/include.txt b/scripts/Windows/Software/osu!/include.txt new file mode 100644 index 00000000..ed6687aa --- /dev/null +++ b/scripts/Windows/Software/osu!/include.txt @@ -0,0 +1,3 @@ +Skins +Songs +osu!.*.cfg