Add scripts for backing up applications
This commit is contained in:
parent
f9020e3e72
commit
1edfa9dd3f
2 changed files with 38 additions and 0 deletions
8
profiles/DerGeret/Backup.ps1
Normal file
8
profiles/DerGeret/Backup.ps1
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
. "../../scripts/Windows/Scripts/Context.ps1";
|
||||||
|
. "../../scripts/Windows/OS/Manage.ps1";
|
||||||
|
|
||||||
|
$null = New-Module {
|
||||||
|
$context = [Context]::new();
|
||||||
|
$context.BackupName = $env:BACKUP_NAME ?? $(Read-Host -Prompt "Please enter a backup name");
|
||||||
|
Invoke-WindowsBackup $context;
|
||||||
|
}
|
30
scripts/Windows/OS/Manage.ps1
Normal file
30
scripts/Windows/OS/Manage.ps1
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
. "$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";
|
||||||
|
|
||||||
|
function Invoke-WindowsBackup([Context] $context) {
|
||||||
|
$backupRoot = $context.BackupRoot();
|
||||||
|
# Invoke-FileBackup $context;
|
||||||
|
Invoke-BackupGit $context;
|
||||||
|
Invoke-BackupLGHub $context;
|
||||||
|
Invoke-BackupManiaPlanet $context;
|
||||||
|
Invoke-BackupOsu $context;
|
||||||
|
Invoke-BackupOsuLazer $context;
|
||||||
|
Invoke-BackupPuTTY $context;
|
||||||
|
Invoke-BackupRetroArch $context;
|
||||||
|
Invoke-BackupReWASD $context;
|
||||||
|
Invoke-BackupTmNations $context;
|
||||||
|
Invoke-BackupTmUnited $context;
|
||||||
|
Invoke-BackupVisualStudio $context;
|
||||||
|
$context.Backup($backupRoot, "$backupRoot.7z", @("-sdel"));
|
||||||
|
}
|
Loading…
Reference in a new issue