-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.me
executable file
·42 lines (36 loc) · 1.03 KB
/
build.me
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.10 2008/01/25 19:57:15 ucko Exp $
#
# W A R N I N G ! ! !
# That script is intended for internal use in NCBI only
#
#
#check that we're running within 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/build
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