1#!/bin/sh 2# 3# $Id: build.me,v 1.11 2014/05/16 20:38:39 ucko Exp $ 4# 5# W A R N I N G ! ! ! 6# That script is intended for internal use in NCBI only 7# 8# 9 10#check that we're running within NCBI 11MYDOMAIN=`grep '^domain' /etc/resolv.conf |awk '{print $2}'` 12test -z "$MYDOMAIN" && \ 13 MYDOMAIN="`hostname | grep '\.' || hostname --fqdn 2>/dev/null`" 14test -z "$MYDOMAIN" && MYDOMAIN="`domainname`" 15if [ `echo "$MYDOMAIN" | grep -c 'nlm[.]nih[.]gov$'` != 1 ] ; then 16 echo That script is intended for internal use in NCBI only 17 exit 1 18fi 19 20SCRIPTDIR=/am/ncbiapdata/scripts/build 21CWD=`pwd` 22UPDIR=`dirname $CWD` 23MYDIR=`basename $CWD` 24if [ "$MYDIR" != "ncbi" ] ; then 25 echo that script should be located in \"ncbi\" directory 26 exit 1; 27fi 28 29echo "Rebuilding ASNs..." 30#first rebuild the asn 31$SCRIPTDIR/rebuild_asn $CWD 32if [ "$?" != 0 ] ; then 33 echo rebuild_asn failed, bye... 34 exit 1 35fi 36 37#now make needed directories if they're absent 38mkdir -p include bin lib build altlib shlib >/dev/null 2>&1 39 40#now start the build 41cd .. && time $SCRIPTDIR/makedis.csh 2>&1 | tee $CWD/out.makedis.csh 42 43exit 0 44