Skip to content

Instantly share code, notes, and snippets.

@rogeriopradoj
Last active November 20, 2017 14:53
Show Gist options
  • Save rogeriopradoj/5aa39dce7a988e62fb79 to your computer and use it in GitHub Desktop.
Save rogeriopradoj/5aa39dce7a988e62fb79 to your computer and use it in GitHub Desktop.
compilar manual php

Referências

Dependências

PEAR

cd ~/contribs/php-manual
wget http://pear.php.net/go-pear.phar
php -d detect_unicode=0 go-pear.phar

PHD

cd ~/contribs/php-manual
git clone http://git.php.net/repository/phd.git
cd phd
sudo pear install package.xml package_generic.xml package_php.xml

EN - 1a. vez

cd ~/contribs/php-manual
svn checkout https://svn.php.net/repository/phpdoc/modules/doc-en
cd doc-en
php doc-base/configure.php --enable-xml-details
phd --docbook doc-base/.manual.xml --package PHP --format php --output mydocs

EN - próximas vezes

cd ~/contribs/php-manual/doc-en
svn update
php doc-base/configure.php --enable-xml-details
phd --docbook doc-base/.manual.xml --package PHP --format php --output mydocs

PT-BR - 1a. vez

cd ~/contribs/php-manual
svn checkout https://svn.php.net/repository/phpdoc/modules/doc-pt_BR
php doc-base/configure.php --enable-xml-details --with-lang=pt_BR
phd --docbook doc-base/.manual.xml --package PHP --format php --output mydocs

PT-BR - próximas vezes

cd ~/contribs/php-manual/doc-pt_BR
svn update
php doc-base/configure.php --enable-xml-details --with-lang=pt_BR
phd --docbook doc-base/.manual.xml --package PHP --format php --output mydocs

WEB - 1a. vez

cd ~/contribs/php-manual
git clone https://github.com/php/web-php.git
rm -r `pwd`/web-php/manual/en
ln -s `pwd`/doc-en/mydocs/php-web `pwd`/web-php/manual/en
ln -s `pwd`/doc-pt_BR/mydocs/php-web `pwd`/web-php/manual/pt_BR
cd web-php
php -S 0.0.0.0:4000

WEB - próximas vezes

cd ~/contribs/php-manual/web-php
git clean -df
git checkout -- .
git pull
cd ~/contribs/php-manual
rm -r `pwd`/web-php/manual/en
ln -s `pwd`/doc-en/mydocs/php-web `pwd`/web-php/manual/en
ln -s `pwd`/doc-pt_BR/mydocs/php-web `pwd`/web-php/manual/pt_BR
cd web-php
php -S 0.0.0.0:4000

Revcheck

php doc-base/scripts/revcheck.php pt_BR > revcheck.html
open revcheck.html

SVN

svn revert --recursive .
svn status
svn commit

Dependências

EN - 1a. vez

cd ~/contribs/php-manual
svn checkout https://svn.php.net/repository/phpdoc/modules/doc-en
cd doc-en
php doc-base/configure.php --enable-xml-details
phd --docbook doc-base/.manual.xml --package PHP --format php --output mydocs

EN - próximas vezes

cd ~/contribs/php-manual/doc-en
svn update
php doc-base/configure.php --enable-xml-details
phd --docbook doc-base/.manual.xml --package PHP --format php --output mydocs

WEB - 1a. vez

cd ~/contribs/php-manual
git clone https://github.com/php/web-php.git
rm -r `pwd`/web-php/manual/en
ln -s `pwd`/doc-en/mydocs/php-web `pwd`/web-php/manual/en
cd web-php
php -S 0.0.0.0:4000

WEB - próximas vezes

cd ~/contribs/php-manual/web-php
git clean -df
git checkout -- .
git pull
cd ~/contribs/php-manual
rm -r `pwd`/web-php/manual/en
ln -s `pwd`/doc-en/mydocs/php-web `pwd`/web-php/manual/en
cd web-php
php -S 0.0.0.0:4000

Dependências

PT-BR - 1a. vez

cd ~/contribs/php-manual && \
svn checkout https://svn.php.net/repository/phpdoc/modules/doc-pt_BR && \
php doc-base/configure.php --enable-xml-details --with-lang=pt_BR && \
phd --docbook doc-base/.manual.xml --package PHP --format php --output mydocs && \
cd ~/contribs/php-manual && \
git clone https://github.com/php/web-php.git && \
ln -s `pwd`/doc-pt_BR/mydocs/php-web `pwd`/web-php/manual/pt_BR && \
cd web-php && \
php -S 0.0.0.0:4000

PT-BR - próximas vezes

cd ~/contribs/php-manual/doc-pt_BR && \
svn update && \
php doc-base/configure.php --enable-xml-details --with-lang=pt_BR && \
phd --docbook doc-base/.manual.xml --package PHP --format php --output mydocs && \
cd ~/contribs/php-manual/web-php && \
git clean -df && \
git checkout -- . && \
git pull && \
cd ~/contribs/php-manual && \
ln -s `pwd`/doc-pt_BR/mydocs/php-web `pwd`/web-php/manual/pt_BR && \
cd web-php && \
php -S 0.0.0.0:4000

rm -rf ~/contribs/php-manual-pt-br-docker && \
cd ~/contribs && \
git clone https://github.com/rogeriopradoj/php-manual-pt-br-docker && \
alias do="~/contribs/php-manual-pt-br-docker/do.sh"

init

# baixar os repos
[ -d ~/contribs/php-manual-pt-br ] || mkdir -p ~/contribs/php-manual-pt-br && \
cd ~/contribs/php-manual-pt-br && \
do svn checkout https://svn.php.net/repository/phpdoc/modules/doc-en && \
do svn checkout https://svn.php.net/repository/phpdoc/modules/doc-pt_BR && \
do git clone --depth=1 https://github.com/php/web-php.git
# compilar en e pt_BR
cd ~/contribs/php-manual-pt-br/doc-en && \
do php doc-base/configure.php --enable-xml-details && \
do phd --docbook doc-base/.manual.xml --package PHP --format php --output mydocs && \
cd ~/contribs/php-manual-pt-br/doc-pt_BR && \
do php doc-base/configure.php --enable-xml-details --with-lang=pt_BR && \
do phd --docbook doc-base/.manual.xml --package PHP --format php --output mydocs
# fazer primeiro links simbólicos
rm -r ~/contribs/php-manual-pt-br/web-php/manual/en && \
ln -s ~/contribs/php-manual-pt-br/doc-en/mydocs/php-web ~/contribs/php-manual-pt-br/web-php/manual/en && \
ln -s ~/contribs/php-manual-pt-br/doc-pt_BR/mydocs/php-web ~/contribs/php-manual-pt-br/web-php/manual/pt_BR
# ligar o servidor web
do php -S 0.0.0.0:4000 -t /php-manual-pt-br/web-php

compilar - testar o

@wsilva
Copy link

wsilva commented Apr 20, 2016

@rogeriopradoj I was testing the steps and I got an issue. Please update your gist with this one https://gist.github.com/wsilva/300ffd2a700be7d1ce06347b6784bbe5

@rogeriopradoj
Copy link
Author

Valeu @wsilva!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment