48 lines
1.3 KiB
PowerShell
48 lines
1.3 KiB
PowerShell
param(
|
|
$Action,
|
|
[hashtable] $Arguments
|
|
)
|
|
|
|
& {
|
|
param($Parameters)
|
|
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
|
|
. "$PSScriptRoot/../../Scripts/SoftwareManagement.ps1";
|
|
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
|
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
|
|
$path = "$HOME/Documents/ManiaPlanet";
|
|
|
|
Start-SoftwareInstaller @Parameters `
|
|
-Installer {
|
|
Install-WingetPackage Nadeo.ManiaPlanet;
|
|
Remove-DesktopIcon "ManiaPlanet*";
|
|
} `
|
|
-UserBackup {
|
|
param(
|
|
[string] $Name,
|
|
[hashtable] $Arguments
|
|
)
|
|
|
|
Add-BackupArtifacts -User $Arguments.Name -Source $path -Path "$Name" `
|
|
-Include @(
|
|
"Actions",
|
|
"Blocks",
|
|
"Items",
|
|
"Maps",
|
|
"Media",
|
|
"Modules",
|
|
"Packs",
|
|
"Replays",
|
|
"Scripts",
|
|
"Skins"
|
|
);
|
|
} `
|
|
-UserConfigurator {
|
|
param(
|
|
[string] $Name,
|
|
[hashtable] $Arguments
|
|
)
|
|
|
|
Expand-BackupArtifacts -User $Arguments.Name -Path "$Name" -Target $path;
|
|
};
|
|
} $PSBoundParameters;
|