1
0
mirror of https://github.com/php/systems.git synced 2026-03-23 23:32:12 +01:00
Files
archived-systems/build-docs-lang-rsync

48 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
echo "Building for " $1
date
echo "Removing old dirs"
rm -rf html php output
date
echo "Running configure"
php8.2 /local/repos/phpdoc-git/doc-base/configure.php --with-lang=$1 --disable-libxml-check --disable-segfault-speed || exit 1
date
echo "Running test and build"
php8.2 /local/repos/phpdoc/phd/render.php --color false --package PHP --format php --format xhtml --format bigxhtml --format tocfeed -d /local/repos/phpdoc-git/doc-base/.manual.xml || exit 2
date
cd output
echo "Moving the TOC feed to correct folder"
mv php-tocfeed php-web/feeds
echo "Zipping downloadable manuals"
gzip -9 php-bigxhtml.html -c > php_manual_$1.html.gz
tar -czf php_manual_$1.tar.gz php-chunked-xhtml
date
echo "Copying manuals to correct place"
cp -p php_manual_$1.html.gz /local/mirrors/phpweb/distributions/manual/
if [ $? -eq 0 ]; then
cp -p php_manual_$1.tar.gz /local/mirrors/phpweb/distributions/manual/
else
echo "FAILED COPYING html.gz INTO DISTRO/MANUAL FOLDER"
fi
date
echo "Copying to rsync space"
cp -rp php-web /local/mirrors/phpweb/manual
if [ $? -eq 0 ]; then
cd /local/mirrors/phpweb/manual
rm -rf $1; mv php-web $1
else
echo "FAILED COPYING php-web TO THE MANUAL FOLDER"
fi
date
echo "Done"