Debian Codegraph @

wtools/getandmake

raw
1 #! /bin/sh
2 # getandmake -- script to run on remote sites
3 # gets the source from the central place and unpacks
4 # and builds it
5
6 TARGET=all
7 VERBOSE=false
8
9 while true
10 do
11 case $1 in
12 -static) TARGET=all_static
13 shift
14 ;;
15 -v) VERBOSE=true
16 shift
17 ;;
18 *) break
19 ;;
20 esac
21 done
22
23 RELEASE=${1-DAILY}
24
25 FTPTMP=/tmp/ftptmp$$
26
27 ftp ftp.sanger.ac.uk > $FTPTMP << ENDFIRSTFTP
28 cd pub/acedb/$RELEASE/
29 ls
30 quit
31 ENDFIRSTFTP
32
33 TARBALL=`grep -i acedb-source $FTPTMP`
34
35 if $VERBOSE
36 then
37 echo Tarball name is $TARBALL
38 fi
39
40 rm -f $FTPTMP
41
42 if [ -d $RELEASE ]
43 then
44 rm -rf $RELEASE
45 fi
46
47 mkdir $RELEASE
48 cd $RELEASE
49
50 ftp ftp.sanger.ac.uk << ENDSECONDFTP
51 cd pub/acedb/$RELEASE/
52 get $TARBALL
53 quit
54 ENDSECONDFTP
55
56 if $VERBOSE
57 then
58 echo -n File has arrived:
59 ls -l $TARBALL
60 fi
61
62 gunzip -f $TARBALL
63
64 tar xf *.tar
65
66 if $VERBOSE
67 then
68 echo compiling $TARGET
69 fi
70
71 ln -s wmake/makefile
72
73 OSTYPE=`ostype`
74 case $OSTYPE in
75 OSF1) ACEDB_MACHINE=ALPHA_4
76 ;;
77 SunOS) ACEDB_MACHINE=SUN_4
78 ;;
79 Solaris) ACEDB_MACHINE=SOLARIS_4
80 ;;
81 Irix) ACEDB_MACHINE=SGI_4
82 ;;
83 Linux) ACEDB_MACHINE=LINUX_4
84 ;;
85 esac
86
87 export ACEDB_MACHINE
88
89 if $VERBOSE
90 then
91 echo compiling for $ACEDB_MACHINE
92 fi
93
94 make $TARGET