~ubuntu-branches/ubuntu/edgy/ncbi-tools6/edgy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
#
# $Id: build.me,v 1.9 2004/04/08 17:53:25 lavr Exp $
#
# W A R N I N G ! ! !
# That script is intended for internal use in NCBI only
#
#

#check that we're running withing NCBI
MYDOMAIN=`grep '^domain' /etc/resolv.conf |awk '{print $2}'`
test -z "$MYDOMAIN"  &&  MYDOMAIN="`hostname --fqdn 2>/dev/null`"
test -z "$MYDOMAIN"  &&  MYDOMAIN="`domainname`"
if [ `echo "$MYDOMAIN" | grep -c 'nlm[.]nih[.]gov$'` != 1 ] ; then
    echo That script is intended for internal use in NCBI only
    exit 1
fi

SCRIPTDIR=/am/ncbiapdata/scripts
CWD=`pwd`
UPDIR=`dirname $CWD`
MYDIR=`basename $CWD`
if [ "$MYDIR" != "ncbi" ] ; then
	echo that script should be located in \"ncbi\" directory
	exit 1;
fi

echo "Rebuilding ASNs..."
#first rebuild the asn
$SCRIPTDIR/rebuild_asn $CWD
if [ "$?" != 0 ] ; then
	echo rebuild_asn failed, bye...
	exit 1
fi

#now make needed directories if they're absent
mkdir -p include bin lib build altlib shlib >/dev/null 2>&1

#now start the build
cd .. && time $SCRIPTDIR/makedis.csh 2>&1 | tee $CWD/out.makedis.csh

exit 0