diff --git a/setup.ps1 b/setup.ps1 index ecb2ce9..44ad43c 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -55,10 +55,17 @@ function InstallTheApps() { function Update-Profile { + + #Check For $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 .\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 #>