@@ -11,21 +11,27 @@ PACKAGE=${PACKAGE:-PHP}
1111MANUAL_PATH=" /var/www/$LANGUAGE /.manual.xml"
1212
1313# 🧩 Step 1. Verify prerequisites (avoid silent empty mounts)
14+ echo " 🔍 Checking required documentation repositories..."
15+
16+ # Check doc-base presence (must contain configure.php)
17+ if [ ! -f /var/www/doc-base/configure.php ]; then
18+ echo " ❌ doc-base is missing or incomplete!"
19+ echo " 👉 Please clone it before running Docker:"
20+ echo " git clone https://github.com/php/doc-base ../doc-base"
21+ echo " "
22+ exit 1
23+ fi
1424
15- REQUIRED_DIRS=" /var/www/doc-base /var/www/$LANGUAGE "
16-
17- echo " 🔍 Checking required documentation directories..."
18- for DIR in $REQUIRED_DIRS ; do
19- if [ ! -d " $DIR " ]; then
20- echo " ❌ Missing required directory: $DIR "
21- echo " 👉 Please clone the required repositories before running Docker:"
22- echo " git clone https://github.com/php/doc-base ../doc-base"
23- echo " git clone https://github.com/php/doc-${LANGUAGE} ../doc-${LANGUAGE} "
24- echo " "
25- echo " 💡 Tip: remove any empty folders and recreate containers with:"
26- echo " docker compose down --volumes && docker compose up --force-recreate"
27- exit 1
28- fi
25+ # Check language documentation presence (must contain entities/)
26+ if [ ! -d /var/www/$LANGUAGE /entities ]; then
27+ echo " ❌ doc-${LANGUAGE} is missing or incomplete!"
28+ echo " 👉 Please clone it before running Docker:"
29+ echo " git clone https://github.com/php/doc-${LANGUAGE} ../doc-${LANGUAGE} "
30+ echo " "
31+ echo " 💡 Tip: remove any empty folders and recreate containers with:"
32+ echo " docker compose down --volumes && docker compose up --force-recreate"
33+ exit 1
34+ fi
2935done
3036echo " ✅ All prerequisites found."
3137echo " "
0 commit comments