Move scripts properly

This commit is contained in:
Manuel Thalmann 2024-08-07 21:05:32 +02:00
parent 36336e332d
commit 2dfb9d58bf
66 changed files with 75 additions and 76 deletions

View file

@ -1,6 +1,6 @@
#!/bin/pwsh
$null = New-Module {
. "$PSScriptRoot/../../../scripts/Windows/Scripts/Context.ps1";
. "$PSScriptRoot/../../../scripts/Common/Scripts/Context.ps1";
. "$PSScriptRoot/../../../scripts/Windows/OS/Manage.ps1";
Write-Host "Starting Backup of Windows";

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../../../scripts/Windows/Scripts/Context.ps1";
. "$PSScriptRoot/../../../scripts/Common/Scripts/Context.ps1";
function Install-PortValhallaDrivers {
param(

View file

@ -1,8 +1,8 @@
#!/bin/pwsh
. "$PSScriptRoot/Drivers.ps1";
. "$PSScriptRoot/../../../scripts/Common/Scripts/Context.ps1";
. "$PSScriptRoot/../../../scripts/Windows/Collections/Personal.ps1"
. "$PSScriptRoot/../../../scripts/Windows/OS/Install.ps1";
. "$PSScriptRoot/../../../scripts/Windows/Scripts/Context.ps1";
function Initialize-Configuration {
# Fix synchronization between Linux and Windows clock

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../../../scripts/Windows/Scripts/Context.ps1";
. "$PSScriptRoot/../../../scripts/Common/Scripts/Context.ps1";
. "$PSScriptRoot/../../../scripts/Windows/OS/Install.ps1";
. "$PSScriptRoot/../../../scripts/Windows/Collections/Generic.ps1"

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/Entrypoints.ps1";
. "$PSScriptRoot/../../Common/Scripts/Entrypoints.ps1";
. "$PSScriptRoot/../../Common/Software/PowerShell/profile.ps1";
class Context {

View file

@ -3,9 +3,9 @@ param (
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Windows/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Windows/Scripts/Scripting.ps1";
. "$PSScriptRoot/../../../Windows/Types/InstallerAction.ps1";
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../Scripts/Scripting.ps1";
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {

View file

@ -1,6 +1,4 @@
#!/bin/pwsh
. "$PSScriptRoot/../Scripts/Context.ps1";
. "$PSScriptRoot/../Scripts/SoftwareManagement.ps1";
. "$PSScriptRoot/../Software/Firefox/Install.ps1";
. "$PSScriptRoot/../Software/git/Manage.ps1";
. "$PSScriptRoot/../Software/LGHub/Manage.ps1";
@ -13,6 +11,8 @@
. "$PSScriptRoot/../Software/TrackMania Nations Forever/Manage.ps1";
. "$PSScriptRoot/../Software/TrackMania United Forever/Manage.ps1";
. "$PSScriptRoot/../Software/VisualStudio/Manage.ps1";
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
. "$PSScriptRoot/../../Common/Scripts/SoftwareManagement.ps1";
function Backup-GenericApps([Context] $context) {
Backup-Git $context;

View file

@ -1,7 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../Scripts/Context.ps1";
. "$PSScriptRoot/Generic.ps1";
. "$PSScriptRoot/../Scripts/SoftwareManagement.ps1";
. "$PSScriptRoot/../Software/Firefox/Install.ps1";
. "$PSScriptRoot/../Software/git/Manage.ps1";
. "$PSScriptRoot/../Software/LGHub/Manage.ps1";
@ -14,6 +12,8 @@
. "$PSScriptRoot/../Software/TrackMania Nations Forever/Manage.ps1";
. "$PSScriptRoot/../Software/TrackMania United Forever/Manage.ps1";
. "$PSScriptRoot/../Software/VisualStudio/Manage.ps1";
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
. "$PSScriptRoot/../../Common/Scripts/SoftwareManagement.ps1";
function Backup-PersonalApps([Context] $context) {
Backup-GenericApps $context;

View file

@ -1,7 +1,7 @@
#!/bin/pwsh
param($context)
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
[Context] $context = $context;
$tempDir = $context.GetTempDirectory();

View file

@ -3,7 +3,7 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {

View file

@ -2,7 +2,7 @@
param($context)
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
[Context]$context = $context;
$tempDir = $context.GetTempDirectory();

View file

@ -3,7 +3,7 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../Scripts/System.ps1";
Start-SoftwareInstaller @PSBoundParameters `

View file

@ -3,7 +3,7 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Scripts/Software.ps1";
. "$PSScriptRoot/../../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {

View file

@ -3,7 +3,7 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Scripts/Software.ps1";
. "$PSScriptRoot/../../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {

View file

@ -3,7 +3,7 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Scripts/Software.ps1";
. "$PSScriptRoot/../../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {

View file

@ -3,7 +3,7 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Scripts/Software.ps1";
. "$PSScriptRoot/../../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {

View file

@ -1,6 +1,6 @@
#!/bin/bash
param($context)
. "$PSScriptRoot/../../Scripts/SoftwareManagement.ps1";
. "$PSScriptRoot/../../../Common/Scripts/SoftwareManagement.ps1";
Write-Host "Installing Tobii Eye Tracking";
Install-SoftwarePackage $context "https://files.update.tech.tobii.com/Tobii_Eye_Tracking_Core_v2.16.8.214_x86.exe";

View file

@ -3,7 +3,7 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {

View file

@ -3,18 +3,18 @@
. "$PSScriptRoot/Manage.ps1";
. "$PSScriptRoot/User/Install.ps1";
. "$PSScriptRoot/../Scripts/Context.ps1";
. "$PSScriptRoot/../Software/Firefox/Install.ps1";
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
$null = New-Module {
. "$PSScriptRoot/../Scripts/Config.ps1";
. "$PSScriptRoot/../Scripts/Hooks.ps1";
. "$PSScriptRoot/../Scripts/Operations.ps1";
. "$PSScriptRoot/../Scripts/PowerManagement.ps1";
. "$PSScriptRoot/../Scripts/Software.ps1";
. "$PSScriptRoot/../Scripts/SoftwareManagement.ps1";
. "$PSScriptRoot/../Scripts/Update.ps1";
. "$PSScriptRoot/../Types/InstallerAction.ps1";
. "$PSScriptRoot/../../Common/Scripts/Config.ps1";
. "$PSScriptRoot/../../Common/Scripts/Operations.ps1";
. "$PSScriptRoot/../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../Common/Scripts/SoftwareManagement.ps1";
. "$PSScriptRoot/../../Common/Types/InstallerAction.ps1";
<#
.SYNOPSIS

View file

@ -1,9 +1,9 @@
#!/bin/pwsh
. "$PSScriptRoot/../Scripts/Context.ps1";
. "$PSScriptRoot/../Scripts/PersonalFiles.ps1";
. "$PSScriptRoot/../Software/Firefox/Install.ps1";
. "$PSScriptRoot/../Software/Nextcloud/Manage.ps1";
. "$PSScriptRoot/../Collections/Personal.ps1";
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
function Backup-WindowsInstallation([Context] $context) {
Write-Information "Backing up Windows";

View file

@ -1,8 +1,8 @@
#!/bin/pwsh
. "$PSScriptRoot/../Scripts/Scripting.ps1";
. "$PSScriptRoot/../../Common/Scripts/Scripting.ps1";
function Start-Setup {
. "$PSScriptRoot/../Scripts/Scripting.ps1";
. "$PSScriptRoot/../../Common/Scripts/Scripting.ps1";
$Global:InformationPreference = "Continue";
$Global:ErrorActionPreference = "Inquire";
$null = $env:WIN_COMPUTER_NAME;

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../Scripts/Context.ps1";
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
function Update-WindowsInstallation([Context] $context)
{

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
$contextScript = "$PSScriptRoot/../../Scripts/Context.ps1";
$contextScript = "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
. "$contextScript";
$preparedUsernameProperty = "AutoLoginUser";
$preparedPasswordProperty = "AutoLoginPassword";

View file

@ -5,7 +5,7 @@ param(
[string]$PreparedSecretProperty
);
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$context = [Context]::new();
$userName = $context.Get($PreparedUsernameProperty);
$password = $context.Get($PreparedSecretProperty);

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
. "$PSScriptRoot/Add.ps1";
function Install-PersonalUsers([Context] $context) {

View file

@ -7,7 +7,7 @@ param (
[string]$UACDisablerTriggerProperty
);
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$context = [Context]::new();
$context.SetUACState($false);
Unregister-ScheduledTask -Confirm:$false $UACDisablerTaskName;

View file

@ -1,6 +1,6 @@
#!/bin/pwsh
. "$PSScriptRoot/Context.ps1";
. "$PSScriptRoot/BrowserAutomation.ps1";
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
. "$PSScriptRoot/../../Common/Scripts/BrowserAutomation.ps1";
function Install-AmdSoftwarePackage() {
param(

View file

@ -1,4 +1,4 @@
. "$PSScriptRoot/Context.ps1";
. "$PSScriptRoot/../../Common/ScriptsContext.ps1";
function Install-AsusSoftwarePackage([Context] $context, [string] $url) {
$packageFile = "AsusPackage.zip";

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/Context.ps1";
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
function Get-BackupCandidates() {
[System.Collections.Generic.List[System.Tuple[string, string, string[]]]]$candidates = @();

View file

@ -1,7 +1,7 @@
using namespace Microsoft.Win32;
$null = New-Module {
. "$PSScriptRoot/Scripting.ps1";
. "$PSScriptRoot/../../Common/Scripts/Scripting.ps1";
[RegistryKey] $key = $null;
$runOncePath = "HKLM:\Software\Microsoft\Windows\CurrentVersion\RunOnce";
$runOnceName = "PortValhalla";

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/Context.ps1";
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
[Context]::new().PreventSleepMode();
$null = powershell -c Get-PackageProvider -ListAvailable NuGet;

View file

@ -1,4 +1,4 @@
#!/bin/pwsh
param($context)
. "$PSScriptRoot/../../Scripts/SoftwareManagement.ps1";
. "$PSScriptRoot/../../../Common/Scripts/SoftwareManagement.ps1";
Install-SoftwarePackage $context "https://github.com/bobranten/Ext4Fsd/releases/download/v0.71/Ext2Fsd-0.71-setup.exe"

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
function Install-Firefox {
param([Context] $context)

View file

@ -1,8 +1,8 @@
#!/bin/pwsh
param($context)
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../Scripts/BrowserAutomation.ps1";
. "$PSScriptRoot/../../Scripts/SoftwareManagement.ps1";
. "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/SoftwareManagement.ps1";
Write-Host "Installing GPU-Z";
$tempDir = $context.GetTempDirectory();

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$null = New-Module {
$path = "$env:LOCALAPPDATA/LGHUB";

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$null = New-Module {
$path = "$HOME/Documents/ManiaPlanet";

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$null = New-Module {
function Restore-Nextcloud([Context] $context) {

View file

@ -1,6 +1,6 @@
#!/bin/pwsh
param($context);
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
[Context] $context = $context;
winget install --accept-source-agreements --accept-package-agreements -s winget --scope machine -e --id JanDeDobbeleer.OhMyPosh;

View file

@ -5,7 +5,7 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {

View file

@ -3,8 +3,8 @@ param (
[hashtable] $Arguments
)
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
@ -16,6 +16,5 @@ Start-SoftwareInstaller @PSBoundParameters `
} `
-Configurator {
. "$PSScriptRoot/../../../Common/Software/PowerShell/Manage.ps1" `
-Action ([InstallerAction]::Configure) `
-Arguments @{ Linux = $false };
-Action ([InstallerAction]::Configure);
};

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$null = New-Module {
$softwareName = "PuTTY";

View file

@ -1,6 +1,6 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/KnownFolders.ps1";
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$null = New-Module {
Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1";

View file

@ -1,7 +1,7 @@
#!/bin/pwsh
param($context)
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
[Context] $context = $context;
choco install -y thunderbird --params "/NoTaskbarShortcut /NoDesktopShortcut";

View file

@ -5,8 +5,8 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../Scripts/AppAssociations.ps1";
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/AppAssociations.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$null = New-Module {
$path = "$HOME/Documents/TmForever";

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$null = New-Module {
$path = "$HOME/Documents/TrackMania";

View file

@ -1,7 +1,7 @@
#!/bin/pwsh
param($context);
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
[Context] $context = $context;
Write-Host "Installing UniFi Controller";

View file

@ -1,6 +1,6 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/KnownFolders.ps1";
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$null = New-Module {
$programs32Path = $(Get-KnownFolder "ProgramFilesX86").Path;

View file

@ -1,7 +1,7 @@
#!/bin/pwsh
param($context)
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
[Context] $context = $context;
choco install -y winscp;

View file

@ -6,7 +6,7 @@ param(
)
. "$PSScriptRoot/../../Scripts/AppAssociations.ps1";
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../Scripts/System.ps1";
Start-SoftwareInstaller @PSBoundParameters `

View file

@ -8,8 +8,8 @@ param(
. "$PSScriptRoot/../../Scripts/Registry.ps1";
. "$PSScriptRoot/../../Scripts/Config.ps1";
. "$PSScriptRoot/../../Scripts/System.ps1";
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {

View file

@ -1,6 +1,6 @@
#!/bin/pwsh
param($context);
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
[Context] $context = $context;
winget install --accept-source-agreements --accept-package-agreements -s winget --scope machine -e --id JanDeDobbeleer.Aliae;

View file

@ -5,7 +5,7 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {

View file

@ -1,6 +1,6 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../Scripts/BashScript.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$null = New-Module {
function Backup-Git([Context] $context) {}

View file

@ -1,6 +1,6 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/KnownFolders.ps1";
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$null = New-Module {
$path = "$((Get-KnownFolder -SpecialFolder ProgramFilesX86).Path)/osu!";

View file

@ -1,5 +1,5 @@
#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$null = New-Module {
$path = "$env:APPDATA/osu";

View file

@ -1,7 +1,7 @@
#!/bin/pwsh
$null = New-Module {
. "$PSScriptRoot/../../Scripts/Context.ps1";
. "$PSScriptRoot/../../Scripts/BrowserAutomation.ps1";
. "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Context.ps1";
$path = "$env:PUBLIC/Documents/reWASD";
$softwareName = "reWASD";