/[CCFs]/bin/buildlatest
ViewVC logotype

Annotation of /bin/buildlatest

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Mon Feb 18 20:23:56 2002 UTC (22 years, 9 months ago) by ccflib
Branch: MAIN
*** empty log message ***

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

  ViewVC Help
Powered by ViewVC 1.1.27