Add check for theme's style.css file

This commit is contained in:
2025-10-07 22:01:33 +02:00
parent a554422633
commit cf83bd7ef7

View File

@@ -48,11 +48,16 @@ check() {
local themeSlug="${1:?check: THEME_SLUG is required}"
local themePath="${themesDir}/${themeSlug}"
# Check if theme directory exists
# Check if theme directory exists - If it doesn't we know immediately that the theme is not installed
if [ ! -d "${themePath}" ]; then
return 1
fi
# Check if theme style.css exists - if yes, theme is probably installed successfully
if [ -f "${themePath}/style.css" ]; then
return 0
fi
# Check if theme theme.json exists - if yes, theme is probably installed successfully
if [ -f "${themePath}/theme.json" ]; then
return 0