2004-09-22 06:02:08 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
CURDATE=`date -I`
|
2004-10-01 06:47:28 -04:00
|
|
|
WORKDIR=/home/bake/bkl-cronjob
|
2006-11-23 08:30:36 -05:00
|
|
|
WINSRCDIR=/mnt/daily
|
2004-10-01 06:47:28 -04:00
|
|
|
FTPDIR=/home/ftp/pub
|
2005-02-23 11:36:08 -05:00
|
|
|
LD_LIBRARY_PATH=/usr/local/lib
|
2004-09-22 06:02:08 -04:00
|
|
|
|
2007-07-05 04:07:24 -04:00
|
|
|
update_from_svn()
|
2004-09-22 06:02:08 -04:00
|
|
|
{
|
|
|
|
(
|
2006-11-27 08:25:06 -05:00
|
|
|
cd ${WORKDIR}/wxWidgets
|
2007-07-05 04:07:24 -04:00
|
|
|
svn up
|
2006-11-27 08:25:06 -05:00
|
|
|
find . -name \.#\* | xargs rm -rf
|
2004-09-22 06:02:08 -04:00
|
|
|
)
|
2006-11-23 08:30:36 -05:00
|
|
|
|
2004-09-22 06:02:08 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
regenerate_makefiles()
|
|
|
|
{
|
2006-11-27 06:50:35 -05:00
|
|
|
(cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O /usr/local/bin/bakefile_gen)
|
2004-09-22 06:02:08 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
do_package()
|
|
|
|
{
|
|
|
|
archtype=$1
|
|
|
|
format=$2
|
|
|
|
shift ; shift
|
|
|
|
|
2004-10-01 06:47:28 -04:00
|
|
|
rm -f ${WORKDIR}/archives/wx-mk-${format}-*
|
2004-09-22 06:02:08 -04:00
|
|
|
|
2004-10-01 06:47:28 -04:00
|
|
|
cd ${WORKDIR}/wxWidgets
|
2004-09-22 06:02:08 -04: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
|
2008-03-16 16:14:53 -04:00
|
|
|
### zip -l -q -9 ../archives/wx-mk-${format}-${CURDATE}.zip $files
|
|
|
|
zip -q -9 ../archives/wx-mk-${format}-${CURDATE}.zip $files
|
2004-09-22 06:02:08 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
2006-11-23 08:30:36 -05:00
|
|
|
|
2004-09-22 06:02:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
package_makefiles()
|
|
|
|
{
|
|
|
|
do_package tar autoconf Makefile.in autoconf_inc.m4
|
2006-11-23 08:30:36 -05:00
|
|
|
do_package zip gnu makefile.unx
|
|
|
|
do_package tar gnu makefile.unx
|
2004-09-22 06:02:08 -04:00
|
|
|
do_package zip mingw makefile.gcc config.gcc
|
2005-02-23 11:36:08 -05:00
|
|
|
do_package zip dmars makefile.dmc config.dmc makefile.dms config.dms
|
2006-11-27 06:50:35 -05:00
|
|
|
do_package zip watcom_msw makefile.wat config.wat
|
2004-09-22 06:02:08 -04:00
|
|
|
do_package zip msvc makefile.vc config.vc
|
|
|
|
do_package zip msvc6prj '*.dsp' '*.dsw'
|
2008-01-30 08:48:04 -05:00
|
|
|
do_package zip msvc7-8prj '*.vcproj' '*.sln'
|
2004-09-22 06:02:08 -04:00
|
|
|
do_package zip evcprj '*.vcp' '*.vcw'
|
2006-11-27 06:50:35 -05:00
|
|
|
(cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O /usr/local/bin/bakefile_gen -f watcom -d ../os2/Bakefiles.os2.bkgen)
|
|
|
|
do_package zip watcom_os2 makefile.wat config.wat
|
2004-09-22 06:02:08 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
copy_files ()
|
|
|
|
{
|
|
|
|
##delete old files and then copy new ones, add a symlink
|
|
|
|
|
|
|
|
## Makefiles
|
2007-07-05 04:07:24 -04:00
|
|
|
find ${FTPDIR}/Daily_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf
|
|
|
|
cp ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/Daily_Makefiles/files
|
2004-09-22 06:02:08 -04:00
|
|
|
|
2007-07-05 04:07:24 -04:00
|
|
|
rm -f ${FTPDIR}/Daily_Makefiles/wx* ${FTPDIR}/Daily_Makefiles/MD5SUM
|
2005-08-06 17:14:02 -04:00
|
|
|
##there must be an easier way of doing these links...
|
2007-07-05 04:07:24 -04:00
|
|
|
for f in `find ${FTPDIR}/Daily_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do
|
2004-09-22 06:02:08 -04:00
|
|
|
ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
|
|
|
|
done
|
2007-07-05 04:07:24 -04:00
|
|
|
md5sum ${FTPDIR}/Daily_Makefiles/wx* > ${FTPDIR}/Daily_Makefiles/MD5SUM
|
2004-10-01 06:47:28 -04:00
|
|
|
sleep 10
|
2007-07-05 04:07:24 -04:00
|
|
|
echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/Daily_Makefiles/updated_at.txt
|
2005-02-23 11:36:08 -05:00
|
|
|
|
2006-11-23 08:30:36 -05:00
|
|
|
## Setup.exe
|
2007-07-05 04:07:24 -04:00
|
|
|
find ${FTPDIR}/Daily_HEAD/files -type f -name wx\* -mtime +3 | xargs rm -rf
|
|
|
|
cp ${WORKDIR}/archives/win/*.exe ${FTPDIR}/Daily_HEAD/files
|
2006-11-23 08:30:36 -05:00
|
|
|
|
2007-07-05 04:07:24 -04:00
|
|
|
rm -f ${FTPDIR}/Daily_HEAD/*.exe ${FTPDIR}/Daily_HEAD/MD5SUM
|
2006-11-23 08:30:36 -05:00
|
|
|
##there must be an easier way of doing these links...
|
2007-07-05 04:07:24 -04:00
|
|
|
for f in `find ${FTPDIR}/Daily_HEAD/files -type f -name wx\*.exe -mmin -601` ; do
|
2006-11-23 08:30:36 -05:00
|
|
|
ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
|
|
|
|
done
|
2007-07-05 04:07:24 -04:00
|
|
|
md5sum ${FTPDIR}/Daily_HEAD/wx* > ${FTPDIR}/Daily_HEAD/MD5SUM
|
2006-11-23 08:30:36 -05:00
|
|
|
sleep 10
|
2007-07-05 04:07:24 -04:00
|
|
|
echo CVS HEAD last updated at `date -u` > ${FTPDIR}/Daily_HEAD/updated_at.txt
|
2006-11-23 08:30:36 -05:00
|
|
|
|
2005-02-23 11:36:08 -05:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
add_win_files ()
|
|
|
|
{
|
2006-11-23 08:30:36 -05:00
|
|
|
### starts with wx***.zip
|
|
|
|
|
2007-07-05 04:07:24 -04:00
|
|
|
for f in `find ${WINSRCDIR}/ -maxdepth 1 -name wx\*.zip ` ; do
|
2006-11-23 08:30:36 -05:00
|
|
|
cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.zip//"`-${CURDATE}.zip
|
2005-02-23 11:36:08 -05:00
|
|
|
done
|
|
|
|
|
2007-07-05 04:07:24 -04:00
|
|
|
for f in `find ${WINSRCDIR}/ -maxdepth 1 -name wx\*.exe ` ; do
|
2006-11-23 08:30:36 -05:00
|
|
|
cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.exe//"`-${CURDATE}.exe
|
2005-02-23 11:36:08 -05:00
|
|
|
done
|
|
|
|
|
|
|
|
}
|
2004-09-22 06:02:08 -04:00
|
|
|
|
2007-07-05 04:07:24 -04:00
|
|
|
update_from_svn
|
2004-09-22 06:02:08 -04:00
|
|
|
regenerate_makefiles
|
|
|
|
package_makefiles
|
|
|
|
|
2008-03-16 16:14:53 -04:00
|
|
|
|
2005-02-23 11:36:08 -05:00
|
|
|
add_win_files
|
2004-09-22 06:02:08 -04:00
|
|
|
|
2005-02-23 11:36:08 -05:00
|
|
|
copy_files
|
2004-09-22 06:02:08 -04:00
|
|
|
|
2005-02-23 11:36:08 -05:00
|
|
|
exit 0
|