Spelling
parent
7039fa97a2
commit
bcb274b178
|
@ -89,9 +89,9 @@ Use White List instead of Black List. This setting will not create the "excluded
|
|||
Get Black/White List from Path (URL/UNC/Local) (download/copy to Winget-AutoUpdate installation location if external list is newer).
|
||||
|
||||
**-ModsPath**
|
||||
Get Mods from Path (URL/UNC/Local) (download/copy to `mods` in Winget-AutoUpdate installation location if external mods is newer).
|
||||
Get Mods from Path (URL/UNC/Local) (download/copy to `mods` in Winget-AutoUpdate installation location if external mods are newer).
|
||||
For URL: This requires a site directory with `Options +Indexes` in `.htaccess` and no index page overriding the listing of files.
|
||||
Or an index page with href listings of all the Mods to be downloaded:
|
||||
Or an index page with href listing of all the Mods to be downloaded:
|
||||
```
|
||||
<ul>
|
||||
<li><a href="Adobe.Acrobat.Reader.32-bit-install.ps1"> Adobe.Acrobat.Reader.32-bit-install.ps1</a></li>
|
||||
|
|
|
@ -15,7 +15,7 @@ function Test-ModsPath ($ModsPath, $WingetUpdatePath) {
|
|||
|
||||
# enable TLS 1.2 and TLS 1.1 protocols
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12, [Net.SecurityProtocolType]::Tls11
|
||||
#Get Index of $ExternalMods (or index page with href listings of all the Mods)
|
||||
#Get Index of $ExternalMods (or index page with href listing of all the Mods)
|
||||
try {
|
||||
$WebResponse = Invoke-WebRequest -Uri $ExternalMods
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ function Test-ModsPath ($ModsPath, $WingetUpdatePath) {
|
|||
|
||||
# Collect the external list of href links
|
||||
$ModLinks = $WebResponse.Links | Select-Object -ExpandProperty href
|
||||
#Delete Local Mods that doesn't exist Externally
|
||||
#Delete Local Mods that don't exist Externally
|
||||
foreach ($Mod in $InternalModsNames) {
|
||||
If ($Mod -notin $ModLinks) {
|
||||
Remove-Item $LocalMods\$Mod -Force -ErrorAction SilentlyContinue | Out-Null
|
||||
|
@ -68,7 +68,7 @@ function Test-ModsPath ($ModsPath, $WingetUpdatePath) {
|
|||
if (Test-Path -Path $ExternalMods"\*.ps1") {
|
||||
#Get File Names Externally
|
||||
$ExternalModsNames = Get-ChildItem -Path $ExternalMods -Name -Recurse -Include *.ps1
|
||||
#Delete Local Mods that doesn't exist Externally
|
||||
#Delete Local Mods that don't exist Externally
|
||||
foreach ($Mod in $InternalModsNames){
|
||||
If($Mod -notin $ExternalModsNames ){
|
||||
Remove-Item $LocalMods\$Mod -Force -ErrorAction SilentlyContinue | Out-Null
|
||||
|
|
Loading…
Reference in New Issue