I am trying to write a site deploy script that will copy files like so:
. .. src/ html/
. .. src/ html/ -> /var/www/ftproot/mysite
I want the files in SOURCE
html to go to DEST
The script was:
cd SOURCE cp -Rf * DEST
Every time I run the script, I get this error:
cp: cannot overwrite non-directory 'html' with directory `html'
From this, I deduce that
cp cannot automatically copy files into DEST when DEST has symbolic links.
Following the cp manual, I set
POSIXLY_CORRECTto 1. This doesn't work.
I had to link site
ftproot/mysiteand not vice versa because the ftp users have weird access modes.
This guy modified
cpsource code and recompiled it. I don't want to do that to a production server.
Any ideas on how to solve this?