Remove unnecessary white space characters
This commit is contained in:
parent
d0b2c4cd80
commit
3982fbc32a
|
@ -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
|
||||
|
||||
|
|
|
@ -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" ]
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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!";
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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" `
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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`""));
|
||||
|
|
|
@ -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.";
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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`""));
|
||||
|
|
|
@ -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`""));
|
||||
|
|
|
@ -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`""));
|
||||
|
|
|
@ -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 @(
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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`""));
|
||||
|
|
Loading…
Reference in a new issue