]>
Commit | Line | Data |
---|---|---|
9f41fa22 CE |
1 | #!/bin/sh |
2 | ||
3 | CURDATE=`date -I` | |
fa24326f CE |
4 | WORKDIR=/home/bake/bkl-cronjob |
5 | FTPDIR=/home/ftp/pub | |
9f41fa22 CE |
6 | |
7 | update_from_cvs() | |
8 | { | |
9 | ( | |
fa24326f | 10 | cd ${WORKDIR}/wxWidgets && cvs -z3 update -P -d |
9f41fa22 CE |
11 | ) |
12 | } | |
13 | ||
14 | ||
15 | regenerate_makefiles() | |
16 | { | |
fa24326f | 17 | (cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O ${WORKDIR}/bakefile/bin/bakefile_gen) |
9f41fa22 CE |
18 | } |
19 | ||
20 | ||
21 | do_package() | |
22 | { | |
23 | archtype=$1 | |
24 | format=$2 | |
25 | shift ; shift | |
26 | ||
fa24326f | 27 | rm -f ${WORKDIR}/archives/wx-mk-${format}-* |
9f41fa22 | 28 | |
fa24326f | 29 | cd ${WORKDIR}/wxWidgets |
9f41fa22 CE |
30 | |
31 | files="" | |
32 | for i in $* ; do | |
33 | files="$files `find -name "$i"`" | |
34 | done | |
35 | ||
36 | if test $archtype = tar ; then | |
37 | tar czf ../archives/wx-mk-${format}-${CURDATE}.tar.gz $files | |
38 | elif test $archtype = zip ; then | |
39 | zip -q -9 ../archives/wx-mk-${format}-${CURDATE}.zip $files | |
40 | fi | |
41 | ||
42 | cd .. | |
43 | } | |
44 | ||
45 | package_cvs() | |
46 | { | |
fa24326f CE |
47 | rm -f ${WORKDIR}/archives/wx-cvs-* |
48 | cd ${WORKDIR}/ | |
9f41fa22 CE |
49 | tar jcf ./archives/wx-cvs-${CURDATE}.tar.bz2 ./wxWidgets |
50 | } | |
51 | ||
52 | ||
53 | package_makefiles() | |
54 | { | |
55 | do_package tar autoconf Makefile.in autoconf_inc.m4 | |
56 | do_package zip borland makefile.bcc config.bcc | |
57 | do_package zip mingw makefile.gcc config.gcc | |
58 | do_package zip dmars makefile.dmc config.dmc | |
59 | do_package zip watcom makefile.wat config.wat | |
60 | do_package zip msvc makefile.vc config.vc | |
61 | do_package zip msvc6prj '*.dsp' '*.dsw' | |
62 | do_package zip evcprj '*.vcp' '*.vcw' | |
63 | } | |
64 | ||
65 | copy_files () | |
66 | { | |
67 | ##delete old files and then copy new ones, add a symlink | |
68 | ## CVS | |
fa24326f CE |
69 | find ${FTPDIR}/CVS_HEAD/files -type f -name wx-cvs\*.tar.bz2 -mtime +6 | xargs rm -rf |
70 | cp ${WORKDIR}/archives/wx-cvs-* ${FTPDIR}/CVS_HEAD/files | |
9f41fa22 | 71 | |
fa24326f CE |
72 | rm ${FTPDIR}/CVS_HEAD/wx-cvs.tar.bz2 |
73 | ln -s ${FTPDIR}/CVS_HEAD/files/wx-cvs-${CURDATE}.tar.bz2 ${FTPDIR}/CVS_HEAD/wx-cvs.tar.bz2 | |
74 | ## make sure updated at is really last | |
75 | sleep 10 | |
76 | echo cvs checkout done at `date -u` > ${FTPDIR}/CVS_HEAD/updated_at.txt | |
9f41fa22 CE |
77 | |
78 | ## Makefiles | |
fa24326f CE |
79 | find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf |
80 | cp ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/CVS_Makefiles/files | |
9f41fa22 | 81 | |
fa24326f | 82 | rm ${FTPDIR}/CVS_Makefiles/wx* |
9f41fa22 | 83 | ##there musrt be an easier way of doing these links... |
fa24326f | 84 | for f in `find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do |
9f41fa22 CE |
85 | ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" ` |
86 | # echo $f | |
87 | # echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" | |
88 | done | |
fa24326f CE |
89 | sleep 10 |
90 | echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/CVS_Makefiles/updated_at.txt | |
9f41fa22 CE |
91 | } |
92 | ||
93 | ||
94 | ||
95 | update_from_cvs | |
96 | regenerate_makefiles | |
97 | package_makefiles | |
98 | package_cvs | |
99 | ||
100 | copy_files | |
101 | ||
102 |