From: Francesco M. <fr...@us...> - 2006-05-24 15:20:12
|
Update of /cvsroot/wxlua/website In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4495 Modified Files: updatesite.sh Log Message: fixed scripts for EOL Index: updatesite.sh =================================================================== RCS file: /cvsroot/wxlua/website/updatesite.sh,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** updatesite.sh 16 May 2006 20:12:51 -0000 1.25 --- updatesite.sh 24 May 2006 15:20:01 -0000 1.26 *************** *** 2,11 **** # $Id$ export CVSROOT=:pserver:ano...@wx...s:/cvsroot/wxlua function restorepermissions { echo Restoring permissions ! cd /home/groups/w/wx/wxlua/htdocs # note: the user permissions must be set, too otherwise the owner --- 2,16 ---- # $Id$ + + # script globals export CVSROOT=:pserver:ano...@wx...s:/cvsroot/wxlua + wxluadir="/home/groups/w/wx/wxlua" + + function restorepermissions { echo Restoring permissions ! cd $wxluadir/htdocs # note: the user permissions must be set, too otherwise the owner *************** *** 17,56 **** } ! echo Checking out website to htdocs dir from cvs ! cd /home/groups/w/wx/wxlua ! cvs -q checkout -P -d htdocs website ! echo Checking out the docs dir to the htdocs/docs dir from cvs ! cd /home/groups/w/wx/wxlua/htdocs ! cvs -q checkout -P -d docs wxLua/docs ! echo Checking out the whole wxLua cvs repository to the htdocs/wxLua dir from cvs ! cd /home/groups/w/wx/wxlua/htdocs ! cvs -q checkout -P wxLua # if user called this with a non-empty argument, limit the # update to the main website only if [ ! -z "$1" ]; then ! echo "Not generating docs and tarball as per user request." restorepermissions exit 0 fi ! echo Generate Doxygen documentation ! cd /home/groups/w/wx/wxlua/htdocs/docs ! doxygen doxygen_website.cfg ! ! echo Create nightly tarball ! cd /home/groups/w/wx/wxlua/htdocs/download ! cvs -q checkout -P wxLua ! cd /home/groups/w/wx/wxlua/htdocs/download/wxLua ! ../add_crlf_to_dsp_dsw ! cd /home/groups/w/wx/wxlua/htdocs/download ! tar \ ! --wildcards --exclude=*.o --exclude=*.d --exclude=*.obj --exclude=*.dll --exclude=*.exe --exclude=*.a --exclude=*.d --exclude=cvs \ ! --create wxLua/* | gzip -c > wxLua_Snapshot_`date +%F`.tar.gz ! echo Since we modified the cvs with add_crlf_to_dsp_dsw we should delete it ! rm -Rf wxLua ! echo Deleting tarballs created more than 1 week ago ! find . -type f -mtime +7 -path "./wxLua_Snapshot_*" | xargs rm -f ! restorepermissions --- 22,84 ---- } + function updatefromcvs + { + echo "Checking out website to htdocs dir from cvs" + cd $wxluadir + cvs -q checkout -P -d htdocs website + + echo "Checking out the docs dir to the htdocs/docs dir from cvs" + cd htdocs + cvs -q checkout -P -d docs wxLua/docs + + echo "Checking out the whole wxLua cvs repository to the htdocs/wxLua dir from cvs" + cd $wxluadir/htdocs + cvs -q checkout -P wxLua + } + + function createdocs + { + echo "Generating Doxygen documentation" + cd $wxluadir/htdocs/docs + doxygen doxygen_website.cfg + } + + function createsnapshot + { + echo "Creating snapshot" + cd $wxluadir/htdocs/download + + cp -rf ../wxLua . + ./fixeol.sh + tar \ + --wildcards --exclude=*.o --exclude=*.d --exclude=*.obj \ + --exclude=*.dll --exclude=*.exe --exclude=*.a --exclude=*.d --exclude=cvs \ + --create wxLua/* | gzip -c > wxLua_Snapshot_`date +%F`.tar.gz + + # remove temporary copy of wxLua modified by fixeol script + rm -Rf wxLua + } + + function removeoldsnapshots + { + # cleanup old tarballs + echo "Deleting snapshots created more than 1 week ago" + find . -type f -mtime +7 -path "./wxLua_Snapshot_*" | xargs rm -f + } ! ! ! updatefromcvs # if user called this with a non-empty argument, limit the # update to the main website only if [ ! -z "$1" ]; then ! echo "Not regenerating docs and snapshot as per user request." restorepermissions exit 0 fi ! createdocs ! createsnapshot ! removeoldsnapshots restorepermissions |