update script to use vars
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -1,19 +1,20 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CURDATE=`date -I`
 | 
					CURDATE=`date -I`
 | 
				
			||||||
 | 
					WORKDIR=/home/bake/bkl-cronjob
 | 
				
			||||||
 | 
					FTPDIR=/home/ftp/pub
 | 
				
			||||||
 | 
					
 | 
				
			||||||
update_from_cvs()
 | 
					update_from_cvs()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    (
 | 
					    (
 | 
				
			||||||
    cd /home/bake/bkl-cronjob/wxWidgets &&  cvs -z3 update -P -d
 | 
					    cd ${WORKDIR}/wxWidgets &&  cvs -z3 update -P -d
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
regenerate_makefiles()
 | 
					regenerate_makefiles()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    BAKEFILE_GEN="python -O /home/bake/bkl-cronjob/bakefile/bin/bakefile_gen"
 | 
					    (cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O ${WORKDIR}/bakefile/bin/bakefile_gen)
 | 
				
			||||||
    (cd /home/bake/bkl-cronjob/wxWidgets/build/bakefiles && nice $BAKEFILE_GEN)
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -23,9 +24,9 @@ do_package()
 | 
				
			|||||||
    format=$2
 | 
					    format=$2
 | 
				
			||||||
    shift ; shift
 | 
					    shift ; shift
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    rm -f /home/bake/bkl-cronjob/archives/wx-mk-${format}-*
 | 
					    rm -f ${WORKDIR}/archives/wx-mk-${format}-*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    cd /home/bake/bkl-cronjob/wxWidgets
 | 
					    cd ${WORKDIR}/wxWidgets
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    files=""
 | 
					    files=""
 | 
				
			||||||
    for i in $* ; do
 | 
					    for i in $* ; do
 | 
				
			||||||
@@ -43,8 +44,8 @@ do_package()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
package_cvs()
 | 
					package_cvs()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    rm -f /home/bake/bkl-cronjob/archives/wx-cvs-*
 | 
					    rm -f ${WORKDIR}/archives/wx-cvs-*
 | 
				
			||||||
    cd /home/bake/bkl-cronjob/
 | 
					    cd ${WORKDIR}/
 | 
				
			||||||
    tar jcf ./archives/wx-cvs-${CURDATE}.tar.bz2 ./wxWidgets
 | 
					    tar jcf ./archives/wx-cvs-${CURDATE}.tar.bz2 ./wxWidgets
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -65,27 +66,28 @@ copy_files ()
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
##delete old files and then copy new ones, add a symlink
 | 
					##delete old files and then copy new ones, add a symlink
 | 
				
			||||||
## CVS
 | 
					## CVS
 | 
				
			||||||
find /home/ftp/pub/CVS_HEAD/files -type f -name wx-cvs\*.tar.bz2 -mtime +6 | xargs rm -rf
 | 
					find ${FTPDIR}/CVS_HEAD/files -type f -name wx-cvs\*.tar.bz2 -mtime +6 | xargs rm -rf
 | 
				
			||||||
cp  /home/bake/bkl-cronjob/archives/wx-cvs-* /home/ftp/pub/CVS_HEAD/files
 | 
					cp  ${WORKDIR}/archives/wx-cvs-* ${FTPDIR}/CVS_HEAD/files
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rm /home/ftp/pub/CVS_HEAD/wx-cvs.tar.bz2
 | 
					rm ${FTPDIR}/CVS_HEAD/wx-cvs.tar.bz2
 | 
				
			||||||
ln -s  /home/ftp/pub/CVS_HEAD/files/wx-cvs-${CURDATE}.tar.bz2  /home/ftp/pub/CVS_HEAD/wx-cvs.tar.bz2
 | 
					ln -s  ${FTPDIR}/CVS_HEAD/files/wx-cvs-${CURDATE}.tar.bz2  ${FTPDIR}/CVS_HEAD/wx-cvs.tar.bz2
 | 
				
			||||||
 | 
					## make sure updated at is really last
 | 
				
			||||||
echo cvs checkout done at  `date` > /home/ftp/pub/CVS_HEAD/updated_at.txt
 | 
					sleep 10
 | 
				
			||||||
 | 
					echo cvs checkout done at  `date -u` > ${FTPDIR}/CVS_HEAD/updated_at.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Makefiles
 | 
					## Makefiles
 | 
				
			||||||
find /home/ftp/pub/CVS_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf
 | 
					find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf
 | 
				
			||||||
cp  /home/bake/bkl-cronjob/archives/wx-mk-* /home/ftp/pub/CVS_Makefiles/files
 | 
					cp  ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/CVS_Makefiles/files
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rm /home/ftp/pub/CVS_Makefiles/wx*
 | 
					rm ${FTPDIR}/CVS_Makefiles/wx*
 | 
				
			||||||
##there musrt be an easier way of doing these links...
 | 
					##there musrt be an easier way of doing these links...
 | 
				
			||||||
for f in `find /home/ftp/pub/CVS_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do
 | 
					for f in `find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do
 | 
				
			||||||
       ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
 | 
					       ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
 | 
				
			||||||
#      echo $f      
 | 
					#      echo $f      
 | 
				
			||||||
#      echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||"
 | 
					#      echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||"
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					sleep 10
 | 
				
			||||||
echo CVS Makefiles generated from bakefiles last updated at `date` > /home/ftp/pub/CVS_Makefiles/updated_at.txt
 | 
					echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/CVS_Makefiles/updated_at.txt
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user