Automate manual update steps (closes #2384)

This commit is contained in:
Bernd Bestel
2025-01-12 15:24:18 +01:00
parent b6ce9eec30
commit b706f0c65a
4 changed files with 40 additions and 6 deletions

View File

@@ -262,3 +262,19 @@ function require_frontend_packages(array $packages)
$GROCY_REQUIRED_FRONTEND_PACKAGES = array_unique(array_merge($GROCY_REQUIRED_FRONTEND_PACKAGES, $packages));
}
function EmptyFolder($folderPath)
{
foreach(glob("{$folderPath}/*") as $item)
{
if(is_dir($item))
{
EmptyFolder($item);
rmdir($item);
}
else
{
unlink($item);
}
}
}