From 3982fbc32a1c7dd2bcfeb2d0ff85e1ac93825915 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 29 Jul 2023 21:13:25 +0200 Subject: [PATCH] Remove unnecessary white space characters --- scripts/Arch/Devices/SurfaceBook2/install.sh | 2 +- scripts/Common/Config/Chromium/install-extension.sh | 2 +- scripts/Debian/Devices/SurfaceBook2/SecureBoot/install.sh | 2 +- .../Debian/Devices/SurfaceBook2/SecureBoot/openssl.cnf | 2 +- scripts/Windows/Config/Windows/Install.ps1 | 4 ++-- scripts/Windows/OS/Upgrade.ps1 | 4 ++-- scripts/Windows/OS/User.ps1 | 4 ++-- scripts/Windows/Scripts/AmdSoftwarePackage.ps1 | 2 +- scripts/Windows/Scripts/BrowserAutomation.ps1 | 2 +- scripts/Windows/Scripts/Context.ps1 | 2 +- scripts/Windows/Software/LGHub/Manage.ps1 | 2 +- scripts/Windows/Software/ManiaPlanet/Manage.ps1 | 2 +- scripts/Windows/Software/Nextcloud/Manage.ps1 | 2 +- scripts/Windows/Software/PuTTY/Manage.ps1 | 2 +- scripts/Windows/Software/RetroArch/Manage.ps1 | 2 +- .../Software/TrackMania Nations Forever/Manage.ps1 | 2 +- .../Windows/Software/TrackMania United Forever/Manage.ps1 | 2 +- scripts/Windows/Software/VisualStudio/Manage.ps1 | 8 ++++---- scripts/Windows/Software/osu!/Manage.ps1 | 2 +- scripts/Windows/Software/osu!lazer/Manage.ps1 | 2 +- scripts/Windows/Software/reWASD/Manage.ps1 | 2 +- 21 files changed, 27 insertions(+), 27 deletions(-) diff --git a/scripts/Arch/Devices/SurfaceBook2/install.sh b/scripts/Arch/Devices/SurfaceBook2/install.sh index 69750963..80c62357 100755 --- a/scripts/Arch/Devices/SurfaceBook2/install.sh +++ b/scripts/Arch/Devices/SurfaceBook2/install.sh @@ -9,7 +9,7 @@ pushd "${BASH_SOURCE%/*}" > /dev/null; yay --noconfirm -Syu \ surface-dtx-daemon-bin \ surface-control-bin; - + sudo systemctl enable surface-dtx-daemon.service systemctl enable --user surface-dtx-userd.service diff --git a/scripts/Common/Config/Chromium/install-extension.sh b/scripts/Common/Config/Chromium/install-extension.sh index ea781d51..1f498d29 100755 --- a/scripts/Common/Config/Chromium/install-extension.sh +++ b/scripts/Common/Config/Chromium/install-extension.sh @@ -41,7 +41,7 @@ else mkdir -p "$EXTENSION_POLICY_DIR"; crxProperty="external_crx"; - find "$EXTENSION_POLICY_DIR" -name "*.json" -print0 | + find "$EXTENSION_POLICY_DIR" -name "*.json" -print0 | while IFS= read -r -d "" file do if [ "$(cat "$file" | jq -r ".$crxProperty")" == "$destination" ] diff --git a/scripts/Debian/Devices/SurfaceBook2/SecureBoot/install.sh b/scripts/Debian/Devices/SurfaceBook2/SecureBoot/install.sh index 13e0bf4c..7573d7ed 100755 --- a/scripts/Debian/Devices/SurfaceBook2/SecureBoot/install.sh +++ b/scripts/Debian/Devices/SurfaceBook2/SecureBoot/install.sh @@ -63,7 +63,7 @@ else # No idea where the `10000000` comes from... # Taken from https://github.com/rhboot/shim/issues/376#issuecomment-964137621 objcopy --set-section-alignment '.sbat=512' --add-section .sbat=sbat.csv --change-section-address .sbat+10000000 "$grubPath"; - + # Add boot entries efibootmgr --unicode --disk /dev/nvme0n1 --part 0 --create --label "Shim" --loader "$defaultFileName"; diff --git a/scripts/Debian/Devices/SurfaceBook2/SecureBoot/openssl.cnf b/scripts/Debian/Devices/SurfaceBook2/SecureBoot/openssl.cnf index ebe7d12a..7cce4716 100644 --- a/scripts/Debian/Devices/SurfaceBook2/SecureBoot/openssl.cnf +++ b/scripts/Debian/Devices/SurfaceBook2/SecureBoot/openssl.cnf @@ -1,7 +1,7 @@ # This definition stops the following lines choking if HOME isn't # defined. HOME = . -RANDFILE = $ENV::HOME/.rnd +RANDFILE = $ENV::HOME/.rnd [ req ] distinguished_name = req_distinguished_name x509_extensions = v3 diff --git a/scripts/Windows/Config/Windows/Install.ps1 b/scripts/Windows/Config/Windows/Install.ps1 index 5822cb45..3bd11d4e 100644 --- a/scripts/Windows/Config/Windows/Install.ps1 +++ b/scripts/Windows/Config/Windows/Install.ps1 @@ -28,13 +28,13 @@ $action = { $winKey = "$($userKey.PSPath)\Software\Microsoft\Windows\CurrentVersion"; $contentDeliveryKey = "$winKey\ContentDeliveryManager"; $cloudContentKey = "HKLM:\Software\Policies\Microsoft\Windows\CloudContent"; - + foreach ($key in @($contentDeliveryKey, $cloudContentKey)) { if (-not (Test-Path $key)) { $null = New-Item $key; } } - + Set-ItemProperty "$cloudContentKey" -Name "DisableWindowsConsumerFeatures" -Value 1 -Type "DWord"; Set-ItemProperty "$cloudContentKey" -Name "DisableCloudOptimizedContent" -Value 1 -Type "DWord"; Set-ItemProperty "$cloudContentKey" -Name "DisableConsumerAccountStateContent" -Value 1 -Type "DWord"; diff --git a/scripts/Windows/OS/Upgrade.ps1 b/scripts/Windows/OS/Upgrade.ps1 index c3f0f068..9c6a4aa8 100644 --- a/scripts/Windows/OS/Upgrade.ps1 +++ b/scripts/Windows/OS/Upgrade.ps1 @@ -7,14 +7,14 @@ function Update-WindowsInstallation([Context] $context) Write-Host "Upgrading Windows"; Write-Host "Preparing for Windows Update"; $null = Import-Module PSWindowsUpdate; - + Write-Host "Performing Windows Update"; try { $null = Install-WindowsUpdate -AcceptAll -IgnoreReboot -ErrorAction "SilentlyContinue"; } catch { } - + if ((Get-WURebootStatus -Silent)) { Write-Information "A Reboot is Required!"; diff --git a/scripts/Windows/OS/User.ps1 b/scripts/Windows/OS/User.ps1 index 7bfe4a77..e1ba2ced 100644 --- a/scripts/Windows/OS/User.ps1 +++ b/scripts/Windows/OS/User.ps1 @@ -18,12 +18,12 @@ function New-PersonalUser([Context] $context) "So... Windows is too dumb to create users which are bound to a Microsoft Account.", "Thus, you have to do it by yourself.", "So sorry...")); - + $users = Get-LocalUser | ForEach-Object { $_.Name }; Write-Host "Following users exist already:" Write-Host $users; Read-Host "Please hit enter once you're done..."; - + $user = Get-LocalUser | Where-Object { -not ($users -contains $_.Name) } | Select-Object -Last 1; if ($user) { diff --git a/scripts/Windows/Scripts/AmdSoftwarePackage.ps1 b/scripts/Windows/Scripts/AmdSoftwarePackage.ps1 index fc1c8a6e..6cd445f4 100644 --- a/scripts/Windows/Scripts/AmdSoftwarePackage.ps1 +++ b/scripts/Windows/Scripts/AmdSoftwarePackage.ps1 @@ -37,7 +37,7 @@ function Install-AmdSoftwarePackage() { } $file = Start-CustomDownload $context $url $action $tempDir; - + Start-Process -Wait -FilePath $file -ArgumentList "/S"; Remove-Item -Recurse $tempDir; } diff --git a/scripts/Windows/Scripts/BrowserAutomation.ps1 b/scripts/Windows/Scripts/BrowserAutomation.ps1 index 86404c31..b84635e8 100644 --- a/scripts/Windows/Scripts/BrowserAutomation.ps1 +++ b/scripts/Windows/Scripts/BrowserAutomation.ps1 @@ -37,7 +37,7 @@ function Start-CustomDownload() { foreach ($file in Get-ChildItem $tempDir) { try { $stream = [System.IO.File]::Open($file.FullName, [System.IO.FileMode]::Open, [System.IO.FileAccess]::ReadWrite, [System.IO.FileShare]::None); - + if ($stream) { $stream.Close(); } diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index b9442e41..0e18b547 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -177,7 +177,7 @@ class Context { if (-not (Test-Path -PathType Container $destinationPath)) { New-Item -ItemType Directory "$destinationPath"; } - + Start-Process -WorkingDirectory "$destinationPath" ` -FilePath "7z" -ArgumentList "x" ` diff --git a/scripts/Windows/Software/LGHub/Manage.ps1 b/scripts/Windows/Software/LGHub/Manage.ps1 index f43169d5..0bc73574 100644 --- a/scripts/Windows/Software/LGHub/Manage.ps1 +++ b/scripts/Windows/Software/LGHub/Manage.ps1 @@ -23,7 +23,7 @@ $null = New-Module { $null = $mainProcesses | Foreach-Object { $_.Kill($true) }; return $lghubPath; } - + function Backup-LogitechGHUB([Context] $context) { Write-Host "Backing Up Logitech G HUB"; $hubPath = Stop-LogitechGHUB; diff --git a/scripts/Windows/Software/ManiaPlanet/Manage.ps1 b/scripts/Windows/Software/ManiaPlanet/Manage.ps1 index 66883c6e..72e270bd 100644 --- a/scripts/Windows/Software/ManiaPlanet/Manage.ps1 +++ b/scripts/Windows/Software/ManiaPlanet/Manage.ps1 @@ -4,7 +4,7 @@ $null = New-Module { $path = "$HOME/Documents/ManiaPlanet"; $softwareName = "ManiaPlanet"; - + function Backup-ManiaPlanet([Context] $context) { Write-Information "Backing up ManiaPlanet"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); diff --git a/scripts/Windows/Software/Nextcloud/Manage.ps1 b/scripts/Windows/Software/Nextcloud/Manage.ps1 index 16bfed51..861414ab 100644 --- a/scripts/Windows/Software/Nextcloud/Manage.ps1 +++ b/scripts/Windows/Software/Nextcloud/Manage.ps1 @@ -19,7 +19,7 @@ $null = New-Module { while (-not (Test-Path $context.GetNextcloudConfigFile())) { Write-Host "Nextcloud has been installed!"; Read-Host "Please log in in the Nextcloud app and hit enter to continue"; - + if (-not (Test-Path $context.GetNextcloudConfigFile())) { Write-Error "The login seems to have failed. Please try again."; } diff --git a/scripts/Windows/Software/PuTTY/Manage.ps1 b/scripts/Windows/Software/PuTTY/Manage.ps1 index 9c049952..37cfa809 100644 --- a/scripts/Windows/Software/PuTTY/Manage.ps1 +++ b/scripts/Windows/Software/PuTTY/Manage.ps1 @@ -4,7 +4,7 @@ $null = New-Module { $softwareName = "PuTTY"; $configFile = "$($softwareName).reg"; - + function Backup-PuTTY([Context] $context) { Write-Host "Backing up PuTTY"; $tempDir = $context.GetTempDirectory(); diff --git a/scripts/Windows/Software/RetroArch/Manage.ps1 b/scripts/Windows/Software/RetroArch/Manage.ps1 index 8f25a099..f87ab0a3 100644 --- a/scripts/Windows/Software/RetroArch/Manage.ps1 +++ b/scripts/Windows/Software/RetroArch/Manage.ps1 @@ -6,7 +6,7 @@ $null = New-Module { Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1"; $path = "C:/tools/RetroArch-Win64"; $softwareName = "RetroArch"; - + function Backup-RetroArch([Context] $context) { Write-Host "Backing up RetroArch"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); diff --git a/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 b/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 index cb3ee738..2b4ca77b 100644 --- a/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 +++ b/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 @@ -4,7 +4,7 @@ $null = New-Module { $path = "$HOME/Documents/TmForever"; $softwareName = "TmNationsForever"; - + function Backup-TmNations([Context] $context) { Write-Host "Backing up TrackMania Nations Forever"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); diff --git a/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 b/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 index e003a470..a92b2e1b 100644 --- a/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 +++ b/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 @@ -4,7 +4,7 @@ $null = New-Module { $path = "$HOME/Documents/TrackMania"; $softwareName = "TmUnitedForever"; - + function Backup-TmUnited([Context] $context) { Write-Host "Backing up TrackMania United Forever"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); diff --git a/scripts/Windows/Software/VisualStudio/Manage.ps1 b/scripts/Windows/Software/VisualStudio/Manage.ps1 index 2258d438..12db08e9 100644 --- a/scripts/Windows/Software/VisualStudio/Manage.ps1 +++ b/scripts/Windows/Software/VisualStudio/Manage.ps1 @@ -5,14 +5,14 @@ Import-Module "KnownFolders"; $null = New-Module { $programs32Path = $(Get-KnownFolder "ProgramFilesX86").Path; $vsInstaller = "$programs32Path/Microsoft Visual Studio/Installer/vs_installer.exe"; - + [System.Tuple[string, string, string][]]$versions = @( [System.Tuple]::Create("visualstudio2019enterprise", "VisualStudio.16.Release", "Microsoft.VisualStudio.Product.Enterprise")); - + function Get-ConfigPath([Context] $context, [string] $packageName) { return Join-Path $($context.BackupRoot()) $packageName ".vsconfig"; } - + function Backup-VisualStudio([Context] $context) { Write-Host "Backing up Visual Studio"; @@ -21,7 +21,7 @@ $null = New-Module { $configPath = Get-ConfigPath $context $version[0]; $null = New-Item -Force -ItemType Directory "$(Split-Path -Parent $configPath)"; - + Start-Process -FilePath "$vsInstaller" ` -Wait ` -ArgumentList @( diff --git a/scripts/Windows/Software/osu!/Manage.ps1 b/scripts/Windows/Software/osu!/Manage.ps1 index 7e35b6f4..46e0e188 100644 --- a/scripts/Windows/Software/osu!/Manage.ps1 +++ b/scripts/Windows/Software/osu!/Manage.ps1 @@ -5,7 +5,7 @@ $null = New-Module { $path = "$((Get-KnownFolder -SpecialFolder ProgramFilesX86).Path)/osu!"; $softwareName = "osu!"; $genericConfigName = "osu!.User.cfg"; - + function Backup-Osu([Context] $context) { Write-Host "Backing up osu!"; $archive = $context.SoftwareArchive($softwareName); diff --git a/scripts/Windows/Software/osu!lazer/Manage.ps1 b/scripts/Windows/Software/osu!lazer/Manage.ps1 index 12de64c9..936048d4 100644 --- a/scripts/Windows/Software/osu!lazer/Manage.ps1 +++ b/scripts/Windows/Software/osu!lazer/Manage.ps1 @@ -4,7 +4,7 @@ $null = New-Module { $path = "$env:APPDATA/osu"; $softwareName = "osu!lazer"; - + function Backup-OsuLazer([Context] $context) { Write-Host "Backing up osu!lazer"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"", "-i!*.realm", "-i!*.db")); diff --git a/scripts/Windows/Software/reWASD/Manage.ps1 b/scripts/Windows/Software/reWASD/Manage.ps1 index 747a31db..20f3591b 100644 --- a/scripts/Windows/Software/reWASD/Manage.ps1 +++ b/scripts/Windows/Software/reWASD/Manage.ps1 @@ -5,7 +5,7 @@ $null = New-Module { $path = "$env:PUBLIC/Documents/reWASD"; $softwareName = "reWASD"; - + function Backup-reWASD([Context] $context) { Write-Host "Backing up reWASD"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-x@`"$PSScriptRoot/exclude.txt`""));