\r
#>\r
\r
-\r
# Setup my PowerShell Profile (on Windows)\r
if(-Not(Test-Path -Path $profile)) {\r
New-Item -Path "$profile" -ItemType File\r
\r
# Install Stub PowerShell Profile that sources the one from DotFiles\r
$sourceMeFile = "$pwd\Microsoft.PowerShell_profile.ps1"\r
-$sourceMeLine = '$profileContents = [string]::join([environment]::newline, (get-content -path'\r
+$sourceMeLine = '$profileContents = [string]::join([environment]::newline, (get-content -path '\r
$sourceMeLine += $sourceMeFile\r
$sourceMeLine += '));invoke-expression $profileContents'\r
\r
-$doneFlagFile = "./DONE.md"\r
-$doBootStrap = -Not (Test-Path -Path $doneFlagFile)\r
+# $doneFlagFile = "./DONE.md"\r
+# $doBootStrap = -Not (Test-Path -Path $doneFlagFile)\r
\r
-$profileContents = Get-Content $profile \r
-if(! $profileContents -contains $sourceMeLine) {\r
- Add-Content -Path $profile -Value $sourceMeLine\r
+$profileStuff = Get-Content -Path $profile \r
+if($profileStuff -Contains $sourceMeLine) {\r
+ Write-Host "Found profile source line: $sourceMeLine"\r
+ Write-Host "in file $profile"\r
+}\r
+else {\r
+ Write-Host "Profile source line will be added to $profile"\r
+ Add-Content -Path $profile -Value "" # Blank line to enforce newline.\r
+ Add-Content -Path $profile -Value $sourceMeLine\r
}\r
\r
# Install profile for Windows Terminal\r
# # Brute force ensure we update our git copy once in awhile.\r
# Copy-Item -Path $destFile -Destination ./profiles.json\r
#}\r
+\r
+PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
\ No newline at end of file