Corrections and Dir already present

pull/59/head
GAJ-san 2022-04-20 11:30:04 +02:00
parent e2c8e3cf21
commit dabc0d165f
2 changed files with 10 additions and 13 deletions

View File

@ -2,17 +2,18 @@
function Test-Mods ($app){ function Test-Mods ($app){
if (Test-Path "$WorkingDir\mods\$app-install.ps1"){ if (Test-Path "$WorkingDir\mods\$app-*"){
$ModsInstall = "$WorkingDir\mods\$app-install.ps1" if (Test-Path "$WorkingDir\mods\$app-install.ps1"){
$ModsUpgrade = "$WorkingDir\mods\$app-install.ps1" $ModsInstall = "$WorkingDir\mods\$app-install.ps1"
$ModsUpgrade = "$WorkingDir\mods\$app-install.ps1"
}
if (Test-Path "$WorkingDir\mods\$app-upgrade.ps1"){
$ModsUpgrade = "$WorkingDir\mods\$app-upgrade.ps1"
}
return $ModsInstall,$ModsUpgrade
} }
if (Test-Path "$WorkingDir\mods\$app-upgrade.ps1"){ else {
$ModsUpgrade = "$WorkingDir\mods\$app-upgrade.ps1"
}
else{
return 0 return 0
} }
return $ModsInstall,$ModsUpgrade
} }

View File

@ -31,10 +31,6 @@ function Update-WAU {
$TempPath = (Resolve-Path "$location\*\Winget-AutoUpdate\")[0].Path $TempPath = (Resolve-Path "$location\*\Winget-AutoUpdate\")[0].Path
if ($TempPath){ if ($TempPath){
Copy-Item -Path "$TempPath\*" -Destination "$WorkingDir\" -Exclude "icons" -Recurse -Force Copy-Item -Path "$TempPath\*" -Destination "$WorkingDir\" -Exclude "icons" -Recurse -Force
#Add 'mods' directory
if (!(Test-Path "$WorkingDir\mods")){
New-Item -ItemType Directory -Force -Path "$WingetUpdatePath\mods"
}
} }
#Remove update zip file and update temp folder #Remove update zip file and update temp folder