-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathbuild-docs-lang-rsync
executable file
·47 lines (37 loc) · 1.19 KB
/
build-docs-lang-rsync
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/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"