X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/blobdiff_plain/2038ce42dea7e474da0e01bea9a6e95f7b867aa6..e0b2c3216dddfd6696e44f38d44ef4ebae7f1a5b:/bootstrap.ps1 diff --git a/bootstrap.ps1 b/bootstrap.ps1 index 8cf3bf1..6377168 100644 --- a/bootstrap.ps1 +++ b/bootstrap.ps1 @@ -2,7 +2,13 @@ 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