]> apps.delaporte.us Git - dotfiles.git/commitdiff
Cleverness to ensure my local profile gets sourced.
authorEdward Delaporte <delaport@illinois.edu>
Wed, 18 Dec 2019 21:14:56 +0000 (15:14 -0600)
committerEdward Delaporte <delaport@illinois.edu>
Wed, 18 Dec 2019 21:14:56 +0000 (15:14 -0600)
Microsoft.PowerShell_profile.ps1
bootstrap.ps1

index 46c9bdfaa4badee1684e60110453151230335e0c..53a6fc40c95576b70faab5ab28ec2424490d8027 100644 (file)
@@ -1,3 +1,12 @@
 
 # Path to Flutter
 
 # Path to Flutter
-$ENV:PATH +=":/home/delaport/development/flutter/bin" # Kali under WSL
\ No newline at end of file
+$ENV:PATH +=":/home/delaport/development/flutter/bin" # Kali under WSL
+
+# Some Paths that are annoying to find/restore if the installer fails
+$ENV:PATH+=";C:\Program Files\Python38\Scripts\;C:\Program Files\Python38\"
+$ENV:PATH+=";C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin"
+$ENV:PATH+=";C:\Program Files (x86)\Common Files\Oracle\Java\javapath"
+$ENV:PATH+=";C:\Program Files\Microsoft VS Code\bin"
+$ENV:PATH+=";C:\Program Files\Git\cmd"
+$ENV:PATH+=";C:\ProgramData\chocolatey\bin"
+$ENV:PATH+=";C:\PENGUIN" # Flag to ensure my profile kicked in.
\ No newline at end of file
index 8cf3bf1991060f4a5a5d0ee3dd90f73dc5d6b22f..637716894073ac7ee606d3b7b4d80b1318f8f7fd 100644 (file)
@@ -2,7 +2,13 @@
 if(-Not(Test-Path -Path $profile)) {
   New-Item -Path "$profile" -ItemType File
 }
 if(-Not(Test-Path -Path $profile)) {
   New-Item -Path "$profile" -ItemType File
 }
-$sourceMeLine = "source $pwd/Microsoft.PowerShell_profile.ps1"
+$sourceMeFile = "$pwd\Microsoft.PowerShell_profile.ps1"
+$sourceMeLine = '$profileContents = [string]::join([environment]::newline, (get-content -path'
+$sourceMeLine += $sourceMeFile
+$sourceMeLine += '));invoke-expression $profileContents'
+
+Write-Host $sourceMeLine
+
 $profileContents = Get-Content $profile 
 if(! $profileContents -contains $sourceMeLine) {
   Add-Content -Path $profile -Value $sourceMeLine
 $profileContents = Get-Content $profile 
 if(! $profileContents -contains $sourceMeLine) {
   Add-Content -Path $profile -Value $sourceMeLine