Create separate script for handling app backups
This commit is contained in:
parent
9758a6428f
commit
c9094c7d04
2 changed files with 33 additions and 24 deletions
30
scripts/Windows/Collections/Personal.ps1
Normal file
30
scripts/Windows/Collections/Personal.ps1
Normal file
|
@ -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;
|
||||||
|
}
|
|
@ -1,32 +1,12 @@
|
||||||
. "$PSScriptRoot/../Scripts/Context.ps1";
|
. "$PSScriptRoot/../Scripts/Context.ps1";
|
||||||
. "$PSScriptRoot/../Scripts/PersonalFiles.ps1";
|
. "$PSScriptRoot/../Scripts/PersonalFiles.ps1";
|
||||||
. "$PSScriptRoot/../Software/git/Manage.ps1";
|
. "$PSScriptRoot/../Collections/Personal.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-WindowsInstallation([Context] $context) {
|
function Backup-WindowsInstallation([Context] $context) {
|
||||||
Write-Information "Backing up Windows";
|
Write-Information "Backing up Windows";
|
||||||
$backupRoot = $context.BackupRoot();
|
$backupRoot = $context.BackupRoot();
|
||||||
Backup-PersonalFiles $context;
|
Backup-PersonalFiles $context;
|
||||||
Backup-Git $context;
|
Backup-PersonalApps $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;
|
|
||||||
$context.Backup($backupRoot, "$backupRoot.7z", @("-sdel"));
|
$context.Backup($backupRoot, "$backupRoot.7z", @("-sdel"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +40,6 @@ function Restore-WindowsInstallation([Context] $context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Restore-PersonalFiles $context;
|
Restore-PersonalFiles $context;
|
||||||
Restore-Git $context;
|
Restore-PersonalApps $context;
|
||||||
|
|
||||||
Remove-Item -Recurse $context.RootDir;
|
Remove-Item -Recurse $context.RootDir;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue