Fixed warnings.
[AROS.git] / scripts / aros_atmidnight
blob278d77646296dc25dedd06635028a6efe2f18f92
1 #!/bin/bash
2 #set -x
4 CVSDIR=/home/cvs/aros
5 AROSDIR=~/packages/AROS
6 SIZEDIR=$HOME/www/www.aros.org/data/
7 keep=2 # How many days to keep (-1)
9 # Nothing to change below here
10 PATH=/bin:/usr/bin:/usr/bin/X11 ; export PATH
12 CVSROOT=$CVSDIR/CVSROOT
13 AROSROOT=$CVSDIR/AROS
14 CONTRIBROOT=$CVSDIR/contrib
15 AROS_SIZE=$SIZEDIR/aros.size
16 CONTRIB_SIZE=$SIZEDIR/contrib.size
18 date="`date '+%d %b %Y'`"
19 today="`date '+%d.%m.%Y'`"
21 # Send commitlog
22 for file in $CVSROOT/commitlog.new* ; do
23 if [ -s $file ]; then
24 name="`basename $file | cut -d. -f3`"
25 mailx -s "Commitlog $date $name" aros-dev < $file
26 echo -n > $file
28 done
30 cvs_update() {
31 cd "$1"
32 nice cvs upd -dP > ~/cvs_update-long.log 2>&1
33 grep -v "^cvs server: Updating " ~/cvs_update-long.log > ~/cvs_update.log
34 if [[ -s ~/cvs_update.log ]]; then
35 echo "cvs update -dP $dir"
36 cat ~/cvs_update.log
40 # Update sources
41 cvs_update $AROSDIR/AROS
42 cvs_update $AROSDIR/dist/AROS.source
44 # Update source size (must be done before make all-docs)
45 size="`du -s $AROSROOT`"
46 echo "$today $size" >> "$AROS_SIZE"
47 size="`du -s $CONTRIBROOT`"
48 echo "$today $size" >> "$CONTRIB_SIZE"
50 # Create docs
51 #cd $AROSDIR/AROS
52 #( autoconf ; ./configure ;
53 #nice make all-docs ) >& ~/nightly_make.log
54 #if [ $? -ne 0 ]; then
55 # cat ~/nightly_make.log
56 #fi
58 # Create nightly builds
59 LOG=~/nightly.log
60 cd $AROSDIR/dist
61 rel=`date '+%Y%m%d'` ; export rel
62 #dstdir=~ftp/pub/aros/snapshots ; export dstdir
63 dstdir=~/snapshots ; export dstdir
64 find $dstdir -mtime +$keep -print0 | xargs -0 rm -f
65 subject="Nightly builds OK"
66 nice ./makedist >& $LOG
67 if [ $? -ne 0 ]; then
68 subject="Nightly builds FAILED"
70 mailx -s "$subject" aros-dev < $LOG
72 # Mirror disk images
73 #cd ~ftp/pub/aros/DiskImages
74 #wget -q --timestamping --no-directories --no-host-directories \
75 # -r --accept "*.bz2" --accept readme.txt \
76 # http://wh2-315.st.uni-magdeburg.de/~sheutlin/aros
77 #rm -f robots.txt
78 #for f in *.bz2 ; do
79 # name=$(basename "$f" .bz2)
80 # if [ ! -f "$name" -o "$name.bz2" -nt "$name" ]; then
81 # bzip2 -cd "$name.bz2" > "$name"
82 # fi
83 # if [ ! -f "$name.gz" -o "$name" -nt "$name.gz" ]; then
84 # gzip -9 < "$name" > "$name.gz"
85 # fi
86 #done
88 # Update the WWW site
89 cd ~/www
90 cvs -q upd -dP
91 cd www.aros.org/data
92 nice make