Skip to content

Commit

Permalink
improve bootstrapping
Browse files Browse the repository at this point in the history
- improve readability of vim path setup
- de-duplicate powershell init message
  • Loading branch information
Okeanos committed Dec 25, 2023
1 parent 4c7978a commit 577b0eb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Function initPowershell
{
New-Item -ItemType Directory -Path "$( $ENV:UserProfile )\Documents\WindowsPowerShell" -Force | Out-Null
LinkFiles "$( $PSScriptRoot )\stow\powershell\" "$( $ENV:UserProfile )\Documents\WindowsPowerShell\"
Write-Host "In PowerShell run the following to allow starship to work: 'Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser'"
}

function DoIt
Expand All @@ -38,7 +39,12 @@ function DoIt
New-Item -Path "$( $ENV:UserProfile )\.config" -ItemType Directory -Force | Out-Null
New-Item -Path "$( $ENV:UserProfile )\.m2" -ItemType Directory -Force | Out-Null
New-Item -Path "$( $ENV:UserProfile )\.ssh\config.d" -ItemType Directory -Force | Out-Null
New-Item -Path "$( $ENV:UserProfile )\.vim\backups", "$( $ENV:UserProfile )\.vim\colors", "$( $ENV:UserProfile )\.vim\swaps", "$( $ENV:UserProfile )\.vim\syntax", "$( $ENV:UserProfile )\.vim\undo" -ItemType Directory -Force | Out-Null
New-Item -Path "$( $ENV:UserProfile )\.vim\backups",
"$( $ENV:UserProfile )\.vim\colors",
"$( $ENV:UserProfile )\.vim\swaps",
"$( $ENV:UserProfile )\.vim\syntax",
"$( $ENV:UserProfile )\.vim\undo" `
-ItemType Directory -Force | Out-Null

Write-Host "Linking files"
LinkFiles "$( $PSScriptRoot )\stow\curl\" "$( $ENV:UserProfile )\"
Expand Down Expand Up @@ -105,7 +111,6 @@ if ($Force)
Write-Host "Linking dotfiles"
DoIt
InitPowershell
Write-Host "In PowerShell run the following to allow starship to work: 'Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser'"
}
else
{
Expand All @@ -121,7 +126,6 @@ else
{
Write-Host "Adding starship to Powershell"
InitPowershell
Write-Host "In PowerShell run the following to allow starship to work: 'Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser'"
}
}

Expand Down

0 comments on commit 577b0eb

Please sign in to comment.