#!/bin/sh short_usage="$0 [-help] [-flavor ] "; long_usage() { cat 1>&2 <. By default, a non-threaded, debug-enabled flavor is installed. This can be modified by the -flavor option, where is specified as [dbg] where the choices are : one of gcc,mpicc,vendorcc : one of 32,64 'dbg' compiles with debug information Example: $0 -flavor gcc64dbg /opt/gt3 END } case "`uname`" in HP-UX) FLAVOR=vendorcc32dbg ;; OSF1) FLAVOR=vendorcc64dbg ;; *) case "`uname -m`" in alpha|ia64) FLAVOR=gcc64dbg ;; *) FLAVOR=gcc32dbg ;; esac ;; esac THREAD=pthr if [ $# -eq 0 ]; then echo "Usage: ${short_usage}" exit 1 fi while [ -n "$1" ]; do case "$1" in -help) long_usage; exit 0 ;; -flavor) if [ -z "$2" ]; then echo "Error: -flavor requires a flavor"; exit 1; fi FLAVOR="$2"; shift ;; *) if [ $# -gt 1 ]; then echo "Unrecognized option $1" exit 1; fi destdir=$1 ;; esac shift done if [ -z "${destdir}" ]; then echo "" >&2 echo "ERROR: install-dir is missing" >&2 echo "${short_usage}" exit 1 fi mkdir -p $destdir if [ $? -ne 0 ]; then echo "Unable to make directory $destdir. Exiting." echo ${short_usage} exit 1 fi MYDIR=`pwd` cd $destdir INSDIR=`pwd` GPT_LOCATION="$INSDIR" GLOBUS_LOCATION="$INSDIR" GT3_LOCATION="$INSDIR" GPT_BUILD="$GPT_LOCATION"/sbin/gpt-build GPT_INSTALL="$GPT_LOCATION"/sbin/gpt-install cd $MYDIR export GPT_LOCATION GLOBUS_LOCATION GT3_LOCATION type gcc echo if [ ! -f gpt-3.0.1/sbin/gpt-build ]; then echo Building GPT ... gzip -dc gpt-3.0.1-src.tar.gz | tar xf - cd gpt-3.0.1 LANG="" ./build_gpt if [ $? -ne 0 ]; then echo Error building GPT exit; fi cd .. fi if [ -d BUILD ]; then rm -fr BUILD fi mkdir -p bundles/gt2-unthreaded-pyGlobus-deps cp bundles/gt2-unthreaded-3.2-src_bundle.tar.gz bundles/gt2-unthreaded-pyGlobus-deps cd bundles/gt2-unthreaded-pyGlobus-deps gzip -dc gt2-unthreaded-3.2-src_bundle.tar.gz | tar xf - cd ../../ $GPT_BUILD bundles/gt2-unthreaded-pyGlobus-deps/globus_xio-*.tar.gz $FLAVOR$THREAD if [ $? -ne 0 ]; then echo Error building globus_xio exit; fi $GPT_BUILD bundles/gt2-unthreaded-pyGlobus-deps/globus_io-*.tar.gz $FLAVOR$THREAD if [ $? -ne 0 ]; then echo Error building globus_io exit; fi $GPT_BUILD bundles/gt2-unthreaded-pyGlobus-deps/globus_ftp_control-*.tar.gz $FLAVOR$THREAD if [ $? -ne 0 ]; then echo Error building globus_ftp_control exit; fi $GPT_BUILD bundles/gt2-unthreaded-pyGlobus-deps/globus_ftp_client-*.tar.gz $FLAVOR$THREAD if [ $? -ne 0 ]; then echo Error building globus_ftp_client exit; fi $GPT_BUILD bundles/gt2-unthreaded-pyGlobus-deps/globus_gram_protocol-*.tar.gz $FLAVOR$THREAD if [ $? -ne 0 ]; then echo Error building globus_gram_protocol exit; fi $GPT_BUILD bundles/gt2-unthreaded-pyGlobus-deps/globus_gram_client-*.tar.gz $FLAVOR$THREAD if [ $? -ne 0 ]; then echo Error building globus_gram_client exit; fi $GPT_BUILD bundles/gt2-unthreaded-pyGlobus-deps/globus_gass_transfer-*.tar.gz $FLAVOR$THREAD if [ $? -ne 0 ]; then echo Error building globus_gass_transfer exit; fi $GPT_BUILD bundles/gt2-unthreaded-pyGlobus-deps/globus_gass_copy-*.tar.gz $FLAVOR$THREAD if [ $? -ne 0 ]; then echo Error building globus_gass_copy exit; fi $GPT_BUILD bundles/gt2-unthreaded-pyGlobus-deps/globus_gass_cache-*.tar.gz $FLAVOR$THREAD if [ $? -ne 0 ]; then echo Error building globus_gass_cache exit; fi $GPT_BUILD bundles/gt2-unthreaded-pyGlobus-deps/globus_gass_server_ez-*.tar.gz $FLAVOR$THREAD if [ $? -ne 0 ]; then echo Error building globus_gass_server_ez exit; fi $GPT_LOCATION/sbin/gpt-postinstall