diff --git a/scripts/Windows/Collections/Personal.ps1 b/scripts/Windows/Collections/Personal.ps1 new file mode 100644 index 00000000..0dacdbaa --- /dev/null +++ b/scripts/Windows/Collections/Personal.ps1 @@ -0,0 +1,30 @@ +. "$PSScriptRoot/../Scripts/Context.ps1"; +. "$PSScriptRoot/../Software/git/Manage.ps1"; +. "$PSScriptRoot/../Software/LGHub/Manage.ps1"; +. "$PSScriptRoot/../Software/ManiaPlanet/Manage.ps1"; +. "$PSScriptRoot/../Software/osu!/Manage.ps1"; +. "$PSScriptRoot/../Software/osu!lazer/Manage.ps1"; +. "$PSScriptRoot/../Software/PuTTY/Manage.ps1"; +. "$PSScriptRoot/../Software/RetroArch/Manage.ps1"; +. "$PSScriptRoot/../Software/reWASD/Manage.ps1"; +. "$PSScriptRoot/../Software/TrackMania Nations Forever/Manage.ps1"; +. "$PSScriptRoot/../Software/TrackMania United Forever/Manage.ps1"; +. "$PSScriptRoot/../Software/VisualStudio/Manage.ps1"; + +function Backup-PersonalApps([Context] $context) { + Backup-Git $context; + Backup-LogitechGHUB $context; + Backup-ManiaPlanet $context; + Backup-Osu $context; + Backup-OsuLazer $context; + Backup-PuTTY $context; + Backup-RetroArch $context; + Backup-reWASD $context; + Backup-TmNations $context; + Backup-TmUnited $context; + Backup-VisualStudio $context; +} + +function Restore-PersonalApps([Context] $context) { + Restore-Git $context; +} diff --git a/scripts/Windows/OS/Manage.ps1 b/scripts/Windows/OS/Manage.ps1 index 06d47a1a..c5d87bc6 100644 --- a/scripts/Windows/OS/Manage.ps1 +++ b/scripts/Windows/OS/Manage.ps1 @@ -1,32 +1,12 @@ . "$PSScriptRoot/../Scripts/Context.ps1"; . "$PSScriptRoot/../Scripts/PersonalFiles.ps1"; -. "$PSScriptRoot/../Software/git/Manage.ps1"; -. "$PSScriptRoot/../Software/LGHub/Manage.ps1"; -. "$PSScriptRoot/../Software/ManiaPlanet/Manage.ps1"; -. "$PSScriptRoot/../Software/osu!/Manage.ps1"; -. "$PSScriptRoot/../Software/osu!lazer/Manage.ps1"; -. "$PSScriptRoot/../Software/PuTTY/Manage.ps1"; -. "$PSScriptRoot/../Software/RetroArch/Manage.ps1"; -. "$PSScriptRoot/../Software/reWASD/Manage.ps1"; -. "$PSScriptRoot/../Software/TrackMania Nations Forever/Manage.ps1"; -. "$PSScriptRoot/../Software/TrackMania United Forever/Manage.ps1"; -. "$PSScriptRoot/../Software/VisualStudio/Manage.ps1"; +. "$PSScriptRoot/../Collections/Personal.ps1"; function Backup-WindowsInstallation([Context] $context) { Write-Information "Backing up Windows"; $backupRoot = $context.BackupRoot(); Backup-PersonalFiles $context; - Backup-Git $context; - Backup-LogitechGHUB $context; - Backup-ManiaPlanet $context; - Backup-Osu $context; - Backup-OsuLazer $context; - Backup-PuTTY $context; - Backup-RetroArch $context; - Backup-reWASD $context; - Backup-TmNations $context; - Backup-TmUnited $context; - Backup-VisualStudio $context; + Backup-PersonalApps $context; $context.Backup($backupRoot, "$backupRoot.7z", @("-sdel")); } @@ -60,7 +40,6 @@ function Restore-WindowsInstallation([Context] $context) { } Restore-PersonalFiles $context; - Restore-Git $context; - + Restore-PersonalApps $context; Remove-Item -Recurse $context.RootDir; }