Streamline PowerShell profile installation

This commit is contained in:
Manuel Thalmann 2024-03-21 00:29:09 +01:00
parent 10f0027736
commit 9ac22c8b99
5 changed files with 8 additions and 23 deletions

View file

@ -1,7 +1,3 @@
#!/bin/pwsh
param($context)
. "$PSScriptRoot/../../Scripts/Context.ps1";
[Context] $context = $context;
Write-Host "Configuring Terminal-Icons";
$context.AddPowerShellProfileStatement("0_Terminal-Icons", 'Import-Module "Terminal-Icons";');
. "$PSScriptRoot/../../../Common/Config/powershell/lib.ps1";
Add-PowerShellProfileStatement -Category "Terminal-Icons" -Statement 'Import-Module "Terminal-Icons";';

View file

@ -1,7 +1,4 @@
#!/bin/pwsh
param($context)
. "$PSScriptRoot/../../Scripts/Context.ps1";
[Context] $context = $context;
. "$PSScriptRoot/../../../Common/Config/powershell/lib.ps1";
Write-Host "Configuring posh-git";
$context.AddPowerShellProfileStatement("0_posh-git", 'Import-Module "posh-git";');
Add-PowerShellProfileStatement -Category "posh-git" -Statement 'Import-Module "posh-git";'

View file

@ -69,8 +69,8 @@ function Invoke-WindowsInstallation([Context] $context)
Write-Host "Setting up software with default app associations";
. "$softwarePath/WinSCP/Install.ps1" $context;
. "$softwarePath/Thunderbird/Install.ps1" $context;
. "$softwarePath/posh-git/Install.ps1" $context;
. "$softwarePath/Terminal-Icons/Install.ps1" $context;
. "$softwarePath/posh-git/Install.ps1";
. "$softwarePath/Terminal-Icons/Install.ps1";
. "$softwarePath/Oh My Posh/Install.ps1" $context;
$context.Set("MachineWideSoftware", 1, "DWord");
}

View file

@ -1,8 +1,4 @@
#!/bin/pwsh
param($context);
. "$PSScriptRoot/../../Scripts/Context.ps1";
[Context] $context = $context;
Install-Module -AcceptLicense -Scope AllUsers -Force Terminal-Icons;
powershell -c "Install-Module -Scope AllUsers -Force Terminal-Icons;";
. "$PSScriptRoot/../../Config/Terminal-Icons/Install.ps1" $context;
. "$PSScriptRoot/../../Config/Terminal-Icons/Install.ps1";

View file

@ -1,8 +1,4 @@
#!/bin/pwsh
param($context);
. "$PSScriptRoot/../../Scripts/Context.ps1";
[Context] $context = $context;
Install-Module -AcceptLicense -Scope AllUsers -Force posh-git;
powershell -c "Install-Module -Scope AllUsers -Force posh-git;";
. "$PSScriptRoot/../../Config/posh-git/Install.ps1" $context;
. "$PSScriptRoot/../../Config/posh-git/Install.ps1";