Some people asked me about how to publish more complex sites. A site with PHP and database connections will soon be shown in this section of the tutorial.
I won't explain how to publish such sites before telling you how to build them. However, I'll put here a Makefile.add I use for this kind of stuff. Read it if you're looking for some ideas, then adapt it to your needs and use it at your own risk.
__set-perm:
find ../www/nao/ -name '*.php' | xargs chmod 755
__local:
find ../www/nao/ -name '*.php' \
| xargs sed --in-place \
-e"s/'localhost', 'user', 'pwd'/'localhost', 'user2', 'pwd2'/g" \
-e"s/mysql_select_db ('Sql12004_1')/mysql_select_db ('aadb')/g" \
-e"s\http://www.noi-animali.org\http://127.0.0.1/~andrea/nao\g"
__production:
find ../www/nao/ -name '*.php' \
| xargs sed --in-place \
-e"s/'localhost', 'user2', 'pwd2'/'localhost', 'user', 'pwd'/g" \
-e"s/mysql_select_db ('aadb')/mysql_select_db ('Sql12004_1')/g" \
-e"s\http://127.0.0.1/~andrea/nao\http://www.noi-animali.org\g"
__upload:
sitecopy --update nao
set-perm: all __set-perm
local: all __local
production: all __production
publish: all __production __set-perm __upload
This manual can be downloaded from http://www.g-cows.org/.