wingetautoupdate/Winget-AutoUpdate/functions/Test-Mods.ps1

19 lines
549 B
PowerShell
Raw Normal View History

2022-04-20 04:22:22 +00:00
#Function to check if modification exists in 'mods' directory
function Test-Mods ($app){
2022-04-20 09:30:04 +00:00
if (Test-Path "$WorkingDir\mods\$app-*"){
if (Test-Path "$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
2022-04-20 04:22:22 +00:00
}
2022-04-20 09:30:04 +00:00
else {
2022-04-20 04:22:22 +00:00
return 0
}
}