Add posh-git
to Windows installations
This commit is contained in:
parent
2a7e0b643e
commit
c851336400
4 changed files with 19 additions and 2 deletions
|
@ -8,6 +8,7 @@ Write-Information "Allow addition of any number of profile files";
|
|||
|
||||
$context.AddPowerShellProfileStatement(
|
||||
@(
|
||||
'# Profile Files',
|
||||
'$profilePath = "$PSScriptRoot/profile.d/*.ps1";',
|
||||
'if (Test-Path $profilePath) {',
|
||||
' . $profilePath;',
|
||||
|
|
7
scripts/Windows/Config/posh-git/Install.ps1
Normal file
7
scripts/Windows/Config/posh-git/Install.ps1
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/pwsh
|
||||
param($context)
|
||||
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
||||
|
||||
[Context] $context = $context;
|
||||
Write-Host "Configuring posh-git";
|
||||
$context.AddPowerShellProfileStatement("posh-git", 'Import-Module "posh-git";');
|
|
@ -57,11 +57,12 @@ function Invoke-WindowsInstallation([Context] $context)
|
|||
exit;
|
||||
}
|
||||
|
||||
if (-not $context.Get("AppAssociations")) {
|
||||
if (-not $context.Get("MachineWideSoftware")) {
|
||||
Write-Host "Setting up software with default app associations";
|
||||
. "$softwarePath/WinSCP/Install.ps1" $context;
|
||||
. "$softwarePath/Thunderbird/Install.ps1" $context;
|
||||
$context.Set("AppAssociations", 1, "DWord");
|
||||
. "$softwarePath/posh-git/Install.ps1" $context;
|
||||
$context.Set("MachineWideSoftware", 1, "DWord");
|
||||
}
|
||||
|
||||
New-PersonalUser $context;
|
||||
|
|
8
scripts/Windows/Software/posh-git/Install.ps1
Normal file
8
scripts/Windows/Software/posh-git/Install.ps1
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/pwsh
|
||||
param($context);
|
||||
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
||||
|
||||
[Context] $context = $context;
|
||||
Install-Module -Scope AllUsers posh-git;
|
||||
powershell -c "Install-Module -Scope AllUsers posh-git;";
|
||||
. "$PSScriptRoot/../../Config/posh-git/Install.ps1" $context;
|
Loading…
Reference in a new issue