No longer getting multiple copies of autocomp text

This commit is contained in:
TheFlyingFool 2024-05-14 15:56:42 -05:00
parent 12d828c75e
commit b9ec0eb3ba

View File

@ -55,10 +55,17 @@ function InstallTheApps() {
function Update-Profile { function Update-Profile {
#Check For $PROFILE
if (-not (Test-Path $PROFILE)) { $null = New-Item -Force $PROFILE } if (-not (Test-Path $PROFILE)) { $null = New-Item -Force $PROFILE }
if (-not (Test-Path ./CopyFromFile.txt)) {iex ((New-Object System.Net.WebClient).DownloadString('https://git.theflyingfool.com/theflyingfool/Win_Setup/raw/branch/main/CopyFromFile.txt'))}
#Grab "Helper File"
$URL="https://git.theflyingfool.com/theflyingfool/Win_Setup/raw/branch/main/CopyFromFile.txt"
$PATH="$PWD\CopyFromFile.txt"
if (-not (Test-Path ./CopyFromFile.txt)) { (New-Object System.Net.WebClient).DownloadFile($URL, $PATH) }
# Get-Content -Path $PROFILE # Get-Content -Path $PROFILE
Get-Content -Path .\CopyFromFile.txt | Add-Content -Path $PROFILE $CheckString = Get-Content -Path .\CopyFromFile.txt
if (-not(Select-String -Quiet -Path $PROFILE -Pattern $CheckString)) {Get-Content -Path .\CopyFromFile.txt | Add-Content -Path $PROFILE}
# Get-Content -Path $PROFILE # Get-Content -Path $PROFILE
#> #>