/[CCFs]/bin/buildlatest
ViewVC logotype

Annotation of /bin/buildlatest

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Wed Nov 26 10:50:47 2003 UTC (21 years ago) by ccflib
Branch: MAIN
Changes since 1.1: +1 -0 lines
No changes

1 ccflib 1.1 #! /usr/local/bin/bash
2     #
3     # Giuseppe vacanti, January 2000
4     #
5     # + Build the latest set of CCF packages
6     #
7     # Exit code:
8     # + -1 (255): nothing to build
9     # + 1: shell errors (cd mkdir ...)
10     # + 2: SAS set up cannot find deceit
11     #
12 ccflib 1.2 # $Id$
13 ccflib 1.1
14     cleanup () {
15     cd ~
16     rm -fr $builddir/*
17     exit
18     }
19    
20     buildpkg () {
21     pkg=$1
22     echo Attempting to build $pkg ...
23     (make -s -C $pkg clobber 2>&1 && make -s -C $pkg depend 2>&1 && make -s -C $pkg 2>&1) >> $builddir/build.log
24     }
25    
26     . $HOME/bin/ccflib.cfg
27    
28     builtdir=~/deliveries/built
29     mkdir -p $builtdir
30    
31     trap cleanup SIGINT
32    
33     me=`basename $0`
34     ##echo $me running on `date`
35    
36     PATH=$HOME/bin:$PATH
37     export PATH
38    
39    
40     plist=`findlatest`
41    
42     if [ -z "$plist" ] ; then
43     ## echo Nothing to build.
44     exit -1
45     fi
46    
47     saslatest
48     deceit -v 2>&1 || (echo ERROR: deceit missing; exit 2)
49     ccfextseq -v 2>&1 || (echo ERROR: ccfextseq missing; exit 2)
50    
51     builddir=$HOME/builds/tmp
52     mv $builddir ${builddir}.old
53     rm -fr ${builddir}.old &
54     mkdir -p $builddir
55     cd $builddir || exit 1
56     echo -n Removing the contents of $builddir ...
57     rm -fr *
58     echo ""
59    
60     mkdir packages || exit 1
61    
62     for p in $plist; do
63    
64     echo -n Unpacking `basename $p` ...
65     tar -C packages -xzf $p || (echo FAILED, aborting ; exit 1)
66     echo " done."
67    
68     done
69    
70    
71     CCFDEV=$HOME/ccfdev
72     cd $CCFDEV
73     cvs update 2> /dev/null
74     cd ~-
75     export CCFDEV
76     . $CCFDEV/setup.sh
77    
78     cd packages
79    
80     for p in $plist; do
81     thisp=`basename $p '.tgz' | sed -e 's/-[0-9]\{1,\}\.[0-9]\{1,\}$//'`
82     buildpkg $thisp && (echo ok; mv $p $builtdir) || (echo FAILED ; cat $builddir/build.log)
83     done
84    
85     ###emptypkgdir

  ViewVC Help
Powered by ViewVC 1.1.27