[clue-admin] CVS Publishing Script

Jed S. Baer thag at frii.com
Thu Dec 16 18:30:24 MST 2004


I have had some thoughts on a different scheme for publishing the website
from CVS. Mainly this is due to wanting to not have to use pruning other
flags on a cvs update to get rid of deleted files, etc., and avoid having
the CVS management directories in the web directory tree.

So I wrote the attached script, which I've tested at home already. It has
one bug.

The idea is that the document_root for the website is a symbolic link.
When the website is published, the script creates a new directory,
exports, copies the files into the new directory, and then switches the
symbolic link "html" to point to the new directory, then removes the old
one.

This all works, except for the step of moving the symbolic link. I get no
errors from the 'ln -sf' command (or 'ls -s -f' either). But the link
stays put on the old directory. I can't figure out why this is.

If I copy the ln command from the webserver output, and paste it to the
command line, it works.

The only thing I can think of is maybe the link is "busy" when the command
executes, and so it gets deferred, but restarting apache after the publish
script finishes doesn't make any difference.

So the two questions are:
  1) anyone see any architectural reason not to do it this way?
  2) any suggestions why the ln command isn't doing it?

jed
-- 
http://s88369986.onlinehome.us/freedomsight/

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: publish.sh
Type: application/x-sh
Size: 1258 bytes
Desc: not available
Url : http://cluedenver.org/pipermail/clue-admin/attachments/20041216/28f881a1/publish.sh


More information about the clue-admin mailing list