#!/usr/bin/env csh set CURFILE=`readlink -f ${1}` set CURPATH=`dirname ${CURFILE}` if ( "$2" == "multi_version" ) then set INSTALL_DIR="`realpath ${CURPATH}/../../../../latest`/tools/aoe" set ASCEND_PATH="`realpath ${CURPATH}/../../../../latest/opp`" else set INSTALL_DIR="`realpath ${CURPATH}/..`" set ASCEND_PATH="`realpath ${CURPATH}/../../../`" endif set OS="`arch`" set OPMASTER_SO_PATH_NUM="`find $ASCEND_PATH -name libopmaster_rt2.0.so | grep $OS | wc -l`" if ($OPMASTER_SO_PATH_NUM -gt 1) then set OPMASTER_SO_PATH="`find $ASCEND_PATH -name libopmaster_rt2.0.so | grep $OS | grep "linux" `" else set OPMASTER_SO_PATH="`find $ASCEND_PATH -name libopmaster_rt2.0.so | grep $OS`" set OPMASTER_PATH="`dirname $OPMASTER_SO_PATH`" set BIN="$INSTALL_DIR/bin" set WORDS=`echo $PATH:q | sed 's/:/ /g'` foreach bin ($WORDS:q) if (${bin} != ${CURPATH}) then set BIN=$BIN":"${bin} endif end set PATH=$BIN set REAL="$INSTALL_DIR/lib64" set LD=$REAL":"$OPMASTER_PATH set WORDS=`echo $LD_LIBRARY_PATH:q | sed 's/:/ /g'` foreach bin ($WORDS:q) if (${bin} != ${LD}) then set LD=$LD":"${bin} endif end set LD_LIBRARY_PATH=$LD