2022-04-20 04:22:22 +00:00
|
|
|
#Function to check if modification exists in 'mods' directory
|
|
|
|
|
|
|
|
function Test-Mods ($app){
|
|
|
|
|
2022-04-20 18:54:10 +00:00
|
|
|
#Takes care of a null situation
|
2022-04-23 09:45:37 +00:00
|
|
|
$ModsInstall = $null
|
|
|
|
$ModsUpgrade = $null
|
2022-04-20 18:54:10 +00:00
|
|
|
|
|
|
|
$Mods = "$WorkingDir\mods"
|
|
|
|
if (Test-Path "$Mods\$app-*"){
|
|
|
|
if (Test-Path "$Mods\$app-install.ps1"){
|
|
|
|
$ModsInstall = "$Mods\$app-install.ps1"
|
|
|
|
$ModsUpgrade = "$Mods\$app-install.ps1"
|
2022-04-20 09:30:04 +00:00
|
|
|
}
|
2022-04-20 18:54:10 +00:00
|
|
|
if (Test-Path "$Mods\$app-upgrade.ps1"){
|
|
|
|
$ModsUpgrade = "$Mods\$app-upgrade.ps1"
|
2022-04-20 09:30:04 +00:00
|
|
|
}
|
2022-04-20 04:22:22 +00:00
|
|
|
}
|
|
|
|
|
2022-04-23 09:45:37 +00:00
|
|
|
return $ModsInstall,$ModsUpgrade
|
|
|
|
|
2022-04-20 18:54:10 +00:00
|
|
|
}
|