source: project/maintenance/chicken-dev-snapshot.sh @ 11522

Last change on this file since 11522 was 11522, checked in by Ivan Raikov, 12 years ago

Set LD_LIBRARY_PATH to include path to Chicken shared library.

  • Property svn:executable set to *
File size: 2.5 KB
Line 
1#! /bin/sh
2
3tmpdir=/home/chicken/tmp/chicken-daily-snapshot
4chickenpath=$HOME
5csi=$chickenpath/bin/csi
6chicken=$chickenpath/bin/chicken
7chickenlib=$chickenpath/lib
8todaydir=`date +%Y/%m/%d`
9today=`date +%Y%m%d`
10wwwbasedir=/var/www/localhost/htdocs/dev-snapshots
11wwwdir=$wwwbasedir/$todaydir
12PATH=$HOME/bin:/opt/mingw32/bin:$PATH
13
14set -x
15
16if [ ! -e "$tmpdir" ]; then
17    mkdir -p $tmpdir || exit
18fi
19
20cd $tmpdir || exit 1
21rm -rf $tmpdir/chicken* $tmpdir/release* $tmpdir/stream-wiki $tmpdir/wiki
22
23### Fetching chicken from trunk
24svn co --username anonymous --password "" https://localhost/svn/chicken-eggs/chicken/trunk
25svn co --username anonymous --password "" https://localhost/svn/chicken-eggs/release/3/stream-wiki/trunk stream-wiki
26
27## determine version in trunk
28version=`sed -r 's/[^0-9]*(([0-9]+\.)+[0-9]*).*/\1/' $tmpdir/trunk/version.scm`
29
30## determine version of current snapshot
31current=`wget 'http://chicken.wiki.br/dev-snapshots/current' -q -O - | grep -E 'chicken-[0-9]\.[0-9]+\.*[0-9]*\.tar\.gz' | sed 's/.*a href="\(chicken-\(.*\)\.tar\.gz\)".*/\2/'`
32
33## only build the snapshot if version > current
34if test "$current" = "$version"; then
35  exit 0
36fi
37
38### generate the manual and ChangeLog
39cd $tmpdir/trunk
40$csi -s scripts/makehtml.scm --extension-path=$tmpdir/stream-wiki/extensions --pdf
41$csi -s scripts/maketexi.scm
42svn log >ChangeLog
43
44### generating the Windows binary tarball
45make PLATFORM=linux clean
46make PLATFORM=linux confclean
47LD_LIBRARY_PATH=$chickenlib make PLATFORM=cross-linux-mingw PREFIX=/chicken CHICKEN=$chickenpath/bin/chicken DESTDIR=crosschicken install
48cd crosschicken
49zip -r chicken-${version}-mingw32-x86.zip chicken
50
51### generating the linux binary tarball
52cd $tmpdir/trunk
53make PLATFORM=linux clean
54make PLATFORM=linux confclean
55LD_LIBRARY_PATH=$chickenlib make PLATFORM=linux PREFIX=/usr/local CHICKEN=$chickenpath/bin/chicken DESTDIR=linuxchicken install
56tar -czf chicken-${version}-linux-x86.tar.gz -C linuxchicken .
57
58### generate the source snapshot
59cd $tmpdir/trunk
60LD_LIBRARY_PATH=$chickenlib $csi -s scripts/makedist.scm PREFIX=$chickenpath
61
62
63### Publishing
64error=0
65mkdir -p $wwwdir
66cp $tmpdir/trunk/chicken-${version}.tar.gz $wwwdir || error=1
67cp $tmpdir/trunk/chicken.pdf $wwwdir || error=1
68cp $tmpdir/trunk/ChangeLog $wwwdir/ChangeLog.txt || error=1
69cp $tmpdir/trunk/NEWS $wwwdir/NEWS || error=1
70cp $tmpdir/trunk/crosschicken/chicken-${version}-mingw32-x86.zip $wwwdir || error=1
71cp $tmpdir/trunk/chicken-${version}-linux-x86.tar.gz $wwwdir || error=1
72
73if test "$error" -eq "0"; then
74  rm -f $wwwbasedir/current
75  ln -sf $wwwdir $wwwbasedir/current
76fi
77
Note: See TracBrowser for help on using the repository browser.