2004-09-22 10:02:08 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
CURDATE=`date -I`
|
2004-10-01 10:47:28 +00:00
|
|
|
WORKDIR=/home/bake/bkl-cronjob
|
|
|
|
FTPDIR=/home/ftp/pub
|
2004-09-22 10:02:08 +00:00
|
|
|
|
|
|
|
update_from_cvs()
|
|
|
|
{
|
|
|
|
(
|
2004-10-01 10:47:28 +00:00
|
|
|
cd ${WORKDIR}/wxWidgets && cvs -z3 update -P -d
|
2004-09-22 10:02:08 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
regenerate_makefiles()
|
|
|
|
{
|
2004-10-01 10:47:28 +00:00
|
|
|
(cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O ${WORKDIR}/bakefile/bin/bakefile_gen)
|
2004-09-22 10:02:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
do_package()
|
|
|
|
{
|
|
|
|
archtype=$1
|
|
|
|
format=$2
|
|
|
|
shift ; shift
|
|
|
|
|
2004-10-01 10:47:28 +00:00
|
|
|
rm -f ${WORKDIR}/archives/wx-mk-${format}-*
|
2004-09-22 10:02:08 +00:00
|
|
|
|
2004-10-01 10:47:28 +00:00
|
|
|
cd ${WORKDIR}/wxWidgets
|
2004-09-22 10:02:08 +00:00
|
|
|
|
|
|
|
files=""
|
|
|
|
for i in $* ; do
|
|
|
|
files="$files `find -name "$i"`"
|
|
|
|
done
|
|
|
|
|
|
|
|
if test $archtype = tar ; then
|
|
|
|
tar czf ../archives/wx-mk-${format}-${CURDATE}.tar.gz $files
|
|
|
|
elif test $archtype = zip ; then
|
2004-11-25 11:40:34 +00:00
|
|
|
zip -l -q -9 ../archives/wx-mk-${format}-${CURDATE}.zip $files
|
|
|
|
# (-l translates to DOS line endings)
|
2004-09-22 10:02:08 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
|
|
|
package_cvs()
|
|
|
|
{
|
2004-10-01 10:47:28 +00:00
|
|
|
rm -f ${WORKDIR}/archives/wx-cvs-*
|
|
|
|
cd ${WORKDIR}/
|
2004-09-22 10:02:08 +00:00
|
|
|
tar jcf ./archives/wx-cvs-${CURDATE}.tar.bz2 ./wxWidgets
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
package_makefiles()
|
|
|
|
{
|
|
|
|
do_package tar autoconf Makefile.in autoconf_inc.m4
|
|
|
|
do_package zip borland makefile.bcc config.bcc
|
|
|
|
do_package zip mingw makefile.gcc config.gcc
|
|
|
|
do_package zip dmars makefile.dmc config.dmc
|
|
|
|
do_package zip watcom makefile.wat config.wat
|
|
|
|
do_package zip msvc makefile.vc config.vc
|
|
|
|
do_package zip msvc6prj '*.dsp' '*.dsw'
|
|
|
|
do_package zip evcprj '*.vcp' '*.vcw'
|
|
|
|
}
|
|
|
|
|
|
|
|
copy_files ()
|
|
|
|
{
|
|
|
|
##delete old files and then copy new ones, add a symlink
|
|
|
|
## CVS
|
2004-10-01 10:47:28 +00:00
|
|
|
find ${FTPDIR}/CVS_HEAD/files -type f -name wx-cvs\*.tar.bz2 -mtime +6 | xargs rm -rf
|
|
|
|
cp ${WORKDIR}/archives/wx-cvs-* ${FTPDIR}/CVS_HEAD/files
|
2004-09-22 10:02:08 +00:00
|
|
|
|
2004-10-01 10:47:28 +00:00
|
|
|
rm ${FTPDIR}/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
|
|
|
|
sleep 10
|
|
|
|
echo cvs checkout done at `date -u` > ${FTPDIR}/CVS_HEAD/updated_at.txt
|
2004-09-22 10:02:08 +00:00
|
|
|
|
|
|
|
## Makefiles
|
2004-10-01 10:47:28 +00:00
|
|
|
find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf
|
|
|
|
cp ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/CVS_Makefiles/files
|
2004-09-22 10:02:08 +00:00
|
|
|
|
2004-10-01 10:47:28 +00:00
|
|
|
rm ${FTPDIR}/CVS_Makefiles/wx*
|
2004-09-22 10:02:08 +00:00
|
|
|
##there musrt be an easier way of doing these links...
|
2004-10-01 10:47:28 +00:00
|
|
|
for f in `find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do
|
2004-09-22 10:02:08 +00:00
|
|
|
ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
|
|
|
|
# echo $f
|
|
|
|
# echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||"
|
|
|
|
done
|
2004-10-01 10:47:28 +00:00
|
|
|
sleep 10
|
|
|
|
echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/CVS_Makefiles/updated_at.txt
|
2004-09-22 10:02:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
update_from_cvs
|
|
|
|
regenerate_makefiles
|
|
|
|
package_makefiles
|
|
|
|
package_cvs
|
|
|
|
|
|
|
|
copy_files
|
|
|
|
|
|
|
|
|