-
Notifications
You must be signed in to change notification settings - Fork 28
/
build-php-gtk-manual
executable file
·76 lines (59 loc) · 2.08 KB
/
build-php-gtk-manual
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/sh
PATH=/usr/local/bin:$PATH
if [ $# != 6 ]; then
echo usage: $0 phpdocdirectory destdirectory langcode workdirectory destdirectory2 archivepath
exit 1
fi
PHPDOC=$1
DEST=$2
LANG=$3
DIR=$4
DEST2=$5
HISTORY=$6
echo -n ">>> starting build at: "
date
echo ">>> making work directory ... "
# copy php-gtk-doc sources to build dir:
# -r recursively
# -t preserve timestamps
# -u update (don't overwrite newer files)
rsync -rtu $PHPDOC/ $DIR/
cd $DIR || exit 1
echo ">>> running ./configure --with-lang=$LANG --with-history=$HISTORY ... "
./configure --with-lang=$LANG --with-history=$HISTORY || exit 1
echo ">>> running make html ... "
make html || exit 1
echo ">>> running make phpweb ... "
make phpweb || exit 1
echo ">>> running make mirror-files ... "
make mirror-files || exit 1
if test -f scripts/testclasses.xml; then
echo ">>> running make updates ... "
make updates || exit 1
fi
# copy generated HTML files to php-gtk-web/ destination
# -l preserve symlinks
# -p preserve permissions
# -v be verbose
echo ">>> copying HTML version ... "
rsync -rlpvC --delete --delete-after build/$LANG/html/ $DEST/html/ || exit 1
# copy generated PHP files to php-gtk-web/ destination
# --delete delete files that don't exist in the source dir
# --delete-after do deletes after transfer, not before
# --exclude exclude files from copying and deleting
echo ">>> copying PHP version ... "
(cd build/$LANG/php; rsync -rlpvC --delete --delete-after --exclude build.log --exclude html --exclude 'updates*.php' . $DEST) || exit 1
echo ">>> copying standalone versions ... "
rsync -rlpvC build/$LANG/*.gz build/$LANG/*.bz2 build/$LANG/*.zip $DEST2 || exit 1
if test -f testbuild/updates-$LANG.php; then
# copy language-specific updates file to destination
# -a archive mode (equivalent to -rlptgoD)
echo ">>> copying testbuild/updates-$LANG.php to $DEST/updates.php ... "
rsync -au testbuild/updates-$LANG.php $DEST/updates.php || exit 1
fi
echo -n ">>> finished build at: "
date
echo -n ">>> running make clean ... "
make clean || exit 1
echo ">>> success!"
exit 0