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